aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2014-06-11 19:11:32 +0300
committerEli Zaretskii2014-06-11 19:11:32 +0300
commitdf907af0ddfc4282a6184f1b516cd92dbdf0093f (patch)
tree2634706a9f5fb4d188336d2394da02f17483f76b
parent4abee665f60b1eb705d47ba82e3aa4b910f5a040 (diff)
downloademacs-df907af0ddfc4282a6184f1b516cd92dbdf0093f.tar.gz
emacs-df907af0ddfc4282a6184f1b516cd92dbdf0093f.zip
Fix bug #17744 with cursor motion near overlay string with 'cursor' prop.
src/xdisp.c (set_cursor_from_row): Fix an off-by-one error when matching overlay strings with 'cursor' property against buffer positions traversed in the glyph row.
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f7ee48d1d07..3468cea6159 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-06-11 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (set_cursor_from_row): Fix an off-by-one error when
4 matching overlay strings with 'cursor' property against buffer
5 positions traversed in the glyph row. (Bug#17744)
6
12014-06-08 Glenn Morris <rgm@gnu.org> 72014-06-08 Glenn Morris <rgm@gnu.org>
2 8
3 * fileio.c (write-region-inhibit-fsync): Doc tweak. 9 * fileio.c (write-region-inhibit-fsync): Doc tweak.
diff --git a/src/xdisp.c b/src/xdisp.c
index 1a5c29ac5be..f0eeb9ac601 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14421,7 +14421,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
14421 pos_after, 0); 14421 pos_after, 0);
14422 14422
14423 if (prop_pos >= pos_before) 14423 if (prop_pos >= pos_before)
14424 bpos_max = prop_pos - 1; 14424 bpos_max = prop_pos;
14425 } 14425 }
14426 if (INTEGERP (chprop)) 14426 if (INTEGERP (chprop))
14427 { 14427 {
@@ -14495,7 +14495,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
14495 pos_after, 0); 14495 pos_after, 0);
14496 14496
14497 if (prop_pos >= pos_before) 14497 if (prop_pos >= pos_before)
14498 bpos_max = prop_pos - 1; 14498 bpos_max = prop_pos;
14499 } 14499 }
14500 if (INTEGERP (chprop)) 14500 if (INTEGERP (chprop))
14501 { 14501 {
@@ -14525,7 +14525,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
14525 GLYPH_BEFORE and GLYPH_AFTER. */ 14525 GLYPH_BEFORE and GLYPH_AFTER. */
14526 if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end) 14526 if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end)
14527 && BUFFERP (glyph->object) && glyph->charpos == pt_old) 14527 && BUFFERP (glyph->object) && glyph->charpos == pt_old)
14528 && !(bpos_max < pt_old && pt_old <= bpos_covered)) 14528 && !(bpos_max <= pt_old && pt_old <= bpos_covered))
14529 { 14529 {
14530 /* An empty line has a single glyph whose OBJECT is zero and 14530 /* An empty line has a single glyph whose OBJECT is zero and
14531 whose CHARPOS is the position of a newline on that line. 14531 whose CHARPOS is the position of a newline on that line.