emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master d345c71: Safeguard the fix of bug#40632


From: Eli Zaretskii
Subject: master d345c71: Safeguard the fix of bug#40632
Date: Sat, 18 Apr 2020 09:31:52 -0400 (EDT)

branch: master
commit d345c718cef69bf32deecc7bf790c6595e8aae8c
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Safeguard the fix of bug#40632
    
    * src/xdisp.c (move_it_to): Restrict the recent fix to iteration
    through buffer text.
---
 src/xdisp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index abbe882..01f2720 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9898,9 +9898,13 @@ move_it_to (struct it *it, ptrdiff_t to_charpos, int 
to_x, int to_y, int to_vpos
                 This could happen when the first display element is
                 wider than the window, or if we have a wrap-prefix
                 that doesn't leave enough space after it to display
-                even a single character.  */
+                even a single character.  We only do this for moving
+                through buffer text, as with display/overlay strings
+                we'd need to also compare it->object's, and this is
+                unlikely to happen in that case anyway.  */
              if (IT_CHARPOS (*it) == orig_charpos
-                 && it->method == orig_method)
+                 && it->method == orig_method
+                 && orig_method == GET_FROM_BUFFER)
                set_iterator_to_next (it, false);
              it->continuation_lines_width += it->current_x;
            }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]