aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-03-31 22:30:53 +0300
committerEli Zaretskii2012-03-31 22:30:53 +0300
commit979022ef177beb0022838f6b49da6632cd0d3414 (patch)
tree5aa1030712e514608879b950d5f6ab622e6f660a /src
parenta6b1c7ccc3a017f44e6671b13281ce7f3e32e2af (diff)
downloademacs-979022ef177beb0022838f6b49da6632cd0d3414.tar.gz
emacs-979022ef177beb0022838f6b49da6632cd0d3414.zip
Fix bug #11063 with move_it_by_lines when there's a before-string at bol.
src/xdisp.c (move_it_by_lines): When DVPOS is positive, and the position we get to after a call to move_it_to fails the IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position only if we wind up in a string from display property.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xdisp.c15
2 files changed, 19 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 33c93a30b08..9be289c42bb 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12012-03-31 Eli Zaretskii <eliz@gnu.org> 12012-03-31 Eli Zaretskii <eliz@gnu.org>
2 2
3 * xdisp.c (move_it_by_lines): When DVPOS is positive, and the
4 position we get to after a call to move_it_to fails the
5 IS_POS_VALID_AFTER_MOVE_P test, move to the next buffer position
6 only if we wind up in a string from display property. (Bug#11063)
7
3 * window.c (Fdelete_other_windows_internal): Invalidate the row 8 * window.c (Fdelete_other_windows_internal): Invalidate the row
4 and column information about mouse highlight, so that redisplay 9 and column information about mouse highlight, so that redisplay
5 restores it after reallocating the glyph matrices. (Bug#7464) 10 restores it after reallocating the glyph matrices. (Bug#7464)
diff --git a/src/xdisp.c b/src/xdisp.c
index 54379a2e99f..dcd14a1792a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -8973,7 +8973,20 @@ move_it_by_lines (struct it *it, int dvpos)
8973 { 8973 {
8974 move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS); 8974 move_it_to (it, -1, -1, -1, it->vpos + dvpos, MOVE_TO_VPOS);
8975 if (!IT_POS_VALID_AFTER_MOVE_P (it)) 8975 if (!IT_POS_VALID_AFTER_MOVE_P (it))
8976 move_it_to (it, IT_CHARPOS (*it) + 1, -1, -1, -1, MOVE_TO_POS); 8976 {
8977 /* Only move to the next buffer position if we ended up in a
8978 string from display property, not in an overlay string
8979 (before-string or after-string). That is because the
8980 latter don't conceal the underlying buffer position, so
8981 we can ask to move the iterator to the exact position we
8982 are interested in. Note that, even if we are already at
8983 IT_CHARPOS (*it), the call below is not a no-op, as it
8984 will detect that we are at the end of the string, pop the
8985 iterator, and compute it->current_x and it->hpos
8986 correctly. */
8987 move_it_to (it, IT_CHARPOS (*it) + it->string_from_display_prop_p,
8988 -1, -1, -1, MOVE_TO_POS);
8989 }
8977 } 8990 }
8978 else 8991 else
8979 { 8992 {