diff options
author | Eli Zaretskii <[email protected]> | 2014-06-11 19:11:32 +0300 |
---|---|---|
committer | Eli Zaretskii <[email protected]> | 2014-06-11 19:11:32 +0300 |
commit | df907af0ddfc4282a6184f1b516cd92dbdf0093f (patch) | |
tree | 2634706a9f5fb4d188336d2394da02f17483f76b /src/xdisp.c | |
parent | 4abee665f60b1eb705d47ba82e3aa4b910f5a040 (diff) |
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.
Diffstat (limited to 'src/xdisp.c')
-rw-r--r-- | src/xdisp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 1a5c29ac5b..f0eeb9ac60 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -14421,7 +14421,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, pos_after, 0); if (prop_pos >= pos_before) - bpos_max = prop_pos - 1; + bpos_max = prop_pos; } if (INTEGERP (chprop)) { @@ -14495,7 +14495,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, pos_after, 0); if (prop_pos >= pos_before) - bpos_max = prop_pos - 1; + bpos_max = prop_pos; } if (INTEGERP (chprop)) { @@ -14525,7 +14525,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, GLYPH_BEFORE and GLYPH_AFTER. */ if (!((row->reversed_p ? glyph > glyphs_end : glyph < glyphs_end) && BUFFERP (glyph->object) && glyph->charpos == pt_old) - && !(bpos_max < pt_old && pt_old <= bpos_covered)) + && !(bpos_max <= pt_old && pt_old <= bpos_covered)) { /* An empty line has a single glyph whose OBJECT is zero and whose CHARPOS is the position of a newline on that line. |