Commit df907af0 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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.
parent 4abee665
2014-06-11 Eli Zaretskii <eliz@gnu.org>
* 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. (Bug#17744)
2014-06-08 Glenn Morris <rgm@gnu.org>
* fileio.c (write-region-inhibit-fsync): Doc tweak.
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment