emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 3566644: Fix infloop in redisplay due to truncate


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 3566644: Fix infloop in redisplay due to truncated lines and invisible text
Date: Sat, 8 Oct 2016 07:54:00 +0000 (UTC)

branch: emacs-25
commit 3566644a332f42c2fb68e93f04f2cec92917fcc9
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix infloop in redisplay due to truncated lines and invisible text
    
    * src/xdisp.c (forward_to_next_line_start): Don't call
    'get_next_display_element' after finding the end of line.  This
    avoids setting the row's end position to the wrong value when the
    next screen line begins with invisible text; that wrong value
    caused set_cursor_from_row position the cursor in the wrong screen
    line, and eventually triggered bug#24109.
---
 src/xdisp.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 42c6fb7..a13830c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6298,9 +6298,10 @@ forward_to_next_line_start (struct it *it, bool 
*skipped_p,
        }
       else
        {
-         while (get_next_display_element (it)
-                && !newline_found_p)
+         while (!newline_found_p)
            {
+             if (!get_next_display_element (it))
+               break;
              newline_found_p = ITERATOR_AT_END_OF_LINE_P (it);
              if (newline_found_p && it->bidi_p && bidi_it_prev)
                *bidi_it_prev = it->bidi_it;



reply via email to

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