aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2012-04-09 11:00:08 +0300
committerEli Zaretskii2012-04-09 11:00:08 +0300
commit70f4d9736b7aa878f54530523c281e9db67bf778 (patch)
tree627223db0b76767ac6979f3189d899622f872a13 /src
parente5fcdb5e920e0e07df77ff28e7a5dcd2d4f193fa (diff)
downloademacs-70f4d9736b7aa878f54530523c281e9db67bf778.tar.gz
emacs-70f4d9736b7aa878f54530523c281e9db67bf778.zip
Fix bug #11094 with cursor display on display string after invisible text.
src/xdisp.c (set_cursor_from_row): If the display string appears in the buffer at position that is closer to point than the position after the display string, display the cursor on the first glyph of the display string. Fixes cursor display when a 'display' text property immediately follows invisible text.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/xdisp.c16
2 files changed, 18 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dbff8e35492..c1fcfcf2437 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12012-04-09 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (set_cursor_from_row): If the display string appears in
4 the buffer at position that is closer to point than the position
5 after the display string, display the cursor on the first glyph of
6 the display string. Fixes cursor display when a 'display' text
7 property immediately follows invisible text. (Bug#11094)
8
12012-04-09 Paul Eggert <eggert@cs.ucla.edu> 92012-04-09 Paul Eggert <eggert@cs.ucla.edu>
2 10
3 composite.c: use 'double' consistently 11 composite.c: use 'double' consistently
diff --git a/src/xdisp.c b/src/xdisp.c
index dcd14a1792a..7fb3f8035df 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14042,15 +14042,18 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
14042 || pos <= tem) 14042 || pos <= tem)
14043 { 14043 {
14044 /* If the string from which this glyph came is 14044 /* If the string from which this glyph came is
14045 found in the buffer at point, then we've 14045 found in the buffer at point, or at position
14046 found the glyph we've been looking for. If 14046 that is closer to point than pos_after, then
14047 it comes from an overlay (tem == 0), and it 14047 we've found the glyph we've been looking for.
14048 has the `cursor' property on one of its 14048 If it comes from an overlay (tem == 0), and
14049 it has the `cursor' property on one of its
14049 glyphs, record that glyph as a candidate for 14050 glyphs, record that glyph as a candidate for
14050 displaying the cursor. (As in the 14051 displaying the cursor. (As in the
14051 unidirectional version, we will display the 14052 unidirectional version, we will display the
14052 cursor on the last candidate we find.) */ 14053 cursor on the last candidate we find.) */
14053 if (tem == 0 || tem == pt_old) 14054 if (tem == 0
14055 || tem == pt_old
14056 || (tem - pt_old > 0 && tem < pos_after))
14054 { 14057 {
14055 /* The glyphs from this string could have 14058 /* The glyphs from this string could have
14056 been reordered. Find the one with the 14059 been reordered. Find the one with the
@@ -14088,7 +14091,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
14088 } 14091 }
14089 } 14092 }
14090 14093
14091 if (tem == pt_old) 14094 if (tem == pt_old
14095 || (tem - pt_old > 0 && tem < pos_after))
14092 goto compute_x; 14096 goto compute_x;
14093 } 14097 }
14094 if (tem) 14098 if (tem)