GNU bug report logs -
#25246
25.1.90; Buffer not responsible with overlay at buffer end.
Previous Next
Reported by: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>
Date: Thu, 22 Dec 2016 09:14:02 UTC
Severity: normal
Tags: confirmed
Found in version 25.1.90
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #25 received at 25246 <at> debbugs.gnu.org (full text, mbox):
> Date: Fri, 23 Dec 2016 11:21:00 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 25246 <at> debbugs.gnu.org, npostavs <at> users.sourceforge.net
>
> I will look into this soon. One thing I already saw: this is a very
> old problem, I see it in Emacs 22.1.
If the change below, when applied to the master branch, gives good
results, I will install it.
The results as I see after this change are not ideal (you cannot see
the entire overlay string, unless you manually hscroll the window with
"C-x >", and the cursor at EOB is not visible). But at least the loop
is avoided, AFAICT, and there's only one "blink" of incorrect display.
Is this satisfactory enough to install this simple change?
Thanks.
diff --git a/src/xdisp.c b/src/xdisp.c
index ad0b968..37ca81d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -13049,6 +13049,17 @@ hscroll_window_tree (Lisp_Object window)
init_to_row_start (&it, w, cursor_row);
it.last_visible_x = INFINITY;
move_it_in_display_line_to (&it, pt, -1, MOVE_TO_POS);
+ /* If the line ends in an overlay string with a newline,
+ we might infloop, because displaying the window will
+ want to put the cursor after the overlay, i.e. at X
+ coordinate of zero on the next screen line. So we
+ use the buffer position prior to the overlay string
+ instead. */
+ if (it.method == GET_FROM_STRING && pt > 1)
+ {
+ init_to_row_start (&it, w, cursor_row);
+ move_it_in_display_line_to (&it, pt - 1, -1, MOVE_TO_POS);
+ }
current_buffer = saved_current_buffer;
/* Position cursor in window. */
This bug report was last modified 8 years and 150 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.