aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPip Cet2020-05-31 16:58:19 +0000
committerPip Cet2020-06-02 22:33:48 +0000
commit0bfc4b3dd36a415f118b4b67bfacf99efd6f28c5 (patch)
treeacbad88a665e5bffae6a8e2fee3ff2da974eb31f
parentf3dd3ddd9e7d0f64ed46c55f92db3f7d69cbfe42 (diff)
downloademacs-0bfc4b3dd36a415f118b4b67bfacf99efd6f28c5.tar.gz
emacs-0bfc4b3dd36a415f118b4b67bfacf99efd6f28c5.zip
Avoid losing composition state in handle_stop_backwards
* src/xdisp.c (handle_stop_backwards): Save composition iterator state across our forward scan. (Bug#41626)
-rw-r--r--src/xdisp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 0f06a38d405..f65c3ebcd2f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8692,6 +8692,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos)
8692 ptrdiff_t where_we_are = (bufp ? IT_CHARPOS (*it) : IT_STRING_CHARPOS (*it)); 8692 ptrdiff_t where_we_are = (bufp ? IT_CHARPOS (*it) : IT_STRING_CHARPOS (*it));
8693 struct display_pos save_current = it->current; 8693 struct display_pos save_current = it->current;
8694 struct text_pos save_position = it->position; 8694 struct text_pos save_position = it->position;
8695 struct composition_it save_cmp_it = it->cmp_it;
8695 struct text_pos pos1; 8696 struct text_pos pos1;
8696 ptrdiff_t next_stop; 8697 ptrdiff_t next_stop;
8697 8698
@@ -8719,6 +8720,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos)
8719 it->bidi_p = true; 8720 it->bidi_p = true;
8720 it->current = save_current; 8721 it->current = save_current;
8721 it->position = save_position; 8722 it->position = save_position;
8723 it->cmp_it = save_cmp_it;
8722 next_stop = it->stop_charpos; 8724 next_stop = it->stop_charpos;
8723 it->stop_charpos = it->prev_stop; 8725 it->stop_charpos = it->prev_stop;
8724 handle_stop (it); 8726 handle_stop (it);