aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2026-04-05 12:34:12 +0300
committerEli Zaretskii2026-04-05 12:34:12 +0300
commitc3fda2e34b9725c4931f10ce48df5b1917c916df (patch)
tree0fc1c3082189a6fc49958cc66f95f08bb8c3a8d6 /src
parent91b08717d4d2d95a9f0126beede3f10e37502faf (diff)
downloademacs-c3fda2e34b9725c4931f10ce48df5b1917c916df.tar.gz
emacs-c3fda2e34b9725c4931f10ce48df5b1917c916df.zip
Fix display in window margins when text-area text is reordered
* src/xdisp.c (handle_stop_backwards): Don't overwrite 'stop_charpos' if we end up on a different stack level of the iterator. (Bug#80693)
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index bd07f9983ff..6f06206b43e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9752,6 +9752,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos)
9752 struct display_pos save_current = it->current; 9752 struct display_pos save_current = it->current;
9753 struct text_pos save_position = it->position; 9753 struct text_pos save_position = it->position;
9754 struct composition_it save_cmp_it = it->cmp_it; 9754 struct composition_it save_cmp_it = it->cmp_it;
9755 int save_sp = it->sp;
9755 struct text_pos pos1; 9756 struct text_pos pos1;
9756 ptrdiff_t next_stop; 9757 ptrdiff_t next_stop;
9757 9758
@@ -9783,7 +9784,8 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos)
9783 next_stop = it->stop_charpos; 9784 next_stop = it->stop_charpos;
9784 it->stop_charpos = it->prev_stop; 9785 it->stop_charpos = it->prev_stop;
9785 handle_stop (it); 9786 handle_stop (it);
9786 it->stop_charpos = next_stop; 9787 if (it->sp == save_sp)
9788 it->stop_charpos = next_stop;
9787} 9789}
9788 9790
9789/* Load IT with the next display element from current_buffer. Value 9791/* Load IT with the next display element from current_buffer. Value