+2013-04-13 Eli Zaretskii <eliz@gnu.org>
+
+ * indent.c (Fvertical_motion): Don't consider display strings on
+ overlay strings as display strings on the buffer position we
+ started from. This prevents vertical cursor motion from jumping
+ more than one line when there's an overlay string with a display
+ property at end of line.
+ Reported by Karl Chen <Karl.Chen@quarl.org> in
+ http://lists.gnu.org/archive/html/emacs-devel/2013-04/msg00362.html.
+
2013-04-12 Stefan Monnier <monnier@iro.umontreal.ca>
* window.c (select_window): `record_buffer' even if window is
const char *s = SSDATA (it.string);
const char *e = s + SBYTES (it.string);
+ disp_string_at_start_p =
/* If it.area is anything but TEXT_AREA, we need not bother
about the display string, as it doesn't affect cursor
positioning. */
- disp_string_at_start_p =
- it.string_from_display_prop_p && it.area == TEXT_AREA;
+ it.area == TEXT_AREA
+ && it.string_from_display_prop_p
+ /* A display string on anything but buffer text (e.g., on
+ an overlay string) doesn't affect cursor positioning. */
+ && (it.sp > 0 && it.stack[it.sp - 1].method == GET_FROM_BUFFER);
while (s < e)
{
if (*s++ == '\n')