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

Fix bug #6687 with cursor positioning after before-string from overlays.

 xdisp.c (set_cursor_from_row): Display cursor after all the
 glyphs that come from an overlay.  Don't overstep the last glyph
 when skipping glyphs from an overlay.
parent 68a16905
2010-11-19 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (set_cursor_from_row): Display cursor after all the
glyphs that come from an overlay. Don't overstep the last glyph
when skipping glyphs from an overlay. (Bug#6687)
2010-11-18 Dan Nicolaescu <dann@ics.uci.edu>
 
* alloc.c (refill_memory_reserve): Move declaration ...
......
......@@ -12941,7 +12941,8 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
cursor on that character's glyph. */
EMACS_INT strpos = glyph->charpos;
 
cursor = glyph;
if (tem)
cursor = glyph;
for (glyph += incr;
(row->reversed_p ? glyph > stop : glyph < stop)
&& EQ (glyph->object, str);
......@@ -12958,7 +12959,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
cursor = glyph;
break;
}
if (glyph->charpos < strpos)
if (tem && glyph->charpos < strpos)
{
strpos = glyph->charpos;
cursor = glyph;
......@@ -12973,10 +12974,9 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
}
/* This string is not what we want; skip all of the
glyphs that came from it. */
do
glyph += incr;
while ((row->reversed_p ? glyph > stop : glyph < stop)
&& EQ (glyph->object, str));
&& EQ (glyph->object, str))
glyph += incr;
}
else
glyph += incr;
......
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