aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-08-01 20:59:35 +0300
committerEli Zaretskii2011-08-01 20:59:35 +0300
commitffc21858b7a5d321975dd1673bb94d16a6032bae (patch)
tree30c38fa5758325dafab836e835a4c18916f01504 /src
parent525d5e6efa89c0435dca8fd80ed31b98fd3deed1 (diff)
downloademacs-ffc21858b7a5d321975dd1673bb94d16a6032bae.tar.gz
emacs-ffc21858b7a5d321975dd1673bb94d16a6032bae.zip
Fix last change for bug#9212.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c31
1 files changed, 19 insertions, 12 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index a17d200c827..9d3e501787b 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5730,29 +5730,36 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p)
5730 { 5730 {
5731 if (IT_STRING_CHARPOS (*it) > 0) 5731 if (IT_STRING_CHARPOS (*it) > 0)
5732 { 5732 {
5733 --IT_STRING_CHARPOS (*it); 5733 if (!it->bidi_p)
5734 --IT_STRING_BYTEPOS (*it); 5734 {
5735 if (it->bidi_p) 5735 --IT_STRING_CHARPOS (*it);
5736 --IT_STRING_BYTEPOS (*it);
5737 }
5738 else
5736 { 5739 {
5737 /* We need to restore the bidi iterator to the state 5740 /* We need to restore the bidi iterator to the state
5738 it had on the newline. */ 5741 it had on the newline, and resync the IT's
5742 position with that. */
5739 it->bidi_it = bidi_it_prev; 5743 it->bidi_it = bidi_it_prev;
5740 xassert (IT_STRING_CHARPOS (*it) == it->bidi_it.charpos 5744 IT_STRING_CHARPOS (*it) = it->bidi_it.charpos;
5741 && IT_STRING_BYTEPOS (*it) == it->bidi_it.bytepos); 5745 IT_STRING_BYTEPOS (*it) = it->bidi_it.bytepos;
5742 } 5746 }
5743 } 5747 }
5744 } 5748 }
5745 else if (IT_CHARPOS (*it) > BEGV) 5749 else if (IT_CHARPOS (*it) > BEGV)
5746 { 5750 {
5747 --IT_CHARPOS (*it); 5751 if (!it->bidi_p)
5748 --IT_BYTEPOS (*it); 5752 {
5749 if (it->bidi_p) 5753 --IT_CHARPOS (*it);
5754 --IT_BYTEPOS (*it);
5755 }
5756 else
5750 { 5757 {
5751 /* We need to restore the bidi iterator to the state it 5758 /* We need to restore the bidi iterator to the state it
5752 had on the newline. */ 5759 had on the newline and resync IT with that. */
5753 it->bidi_it = bidi_it_prev; 5760 it->bidi_it = bidi_it_prev;
5754 xassert (IT_CHARPOS (*it) == it->bidi_it.charpos 5761 IT_CHARPOS (*it) = it->bidi_it.charpos;
5755 && IT_BYTEPOS (*it) == it->bidi_it.bytepos); 5762 IT_BYTEPOS (*it) = it->bidi_it.bytepos;
5756 } 5763 }
5757 reseat (it, it->current.pos, 0); 5764 reseat (it, it->current.pos, 0);
5758 } 5765 }