diff options
| author | Eli Zaretskii | 2016-10-08 10:52:52 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-10-08 10:52:52 +0300 |
| commit | 3566644a332f42c2fb68e93f04f2cec92917fcc9 (patch) | |
| tree | 75e41ae9eaee772fd9f1e0fedf14983266183eb5 /src | |
| parent | a6e0a6770129e612398c8db98cd214586dc250f4 (diff) | |
| download | emacs-3566644a332f42c2fb68e93f04f2cec92917fcc9.tar.gz emacs-3566644a332f42c2fb68e93f04f2cec92917fcc9.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 42c6fb75efa..a13830c811e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -6298,9 +6298,10 @@ forward_to_next_line_start (struct it *it, bool *skipped_p, | |||
| 6298 | } | 6298 | } |
| 6299 | else | 6299 | else |
| 6300 | { | 6300 | { |
| 6301 | while (get_next_display_element (it) | 6301 | while (!newline_found_p) |
| 6302 | && !newline_found_p) | ||
| 6303 | { | 6302 | { |
| 6303 | if (!get_next_display_element (it)) | ||
| 6304 | break; | ||
| 6304 | newline_found_p = ITERATOR_AT_END_OF_LINE_P (it); | 6305 | newline_found_p = ITERATOR_AT_END_OF_LINE_P (it); |
| 6305 | if (newline_found_p && it->bidi_p && bidi_it_prev) | 6306 | if (newline_found_p && it->bidi_p && bidi_it_prev) |
| 6306 | *bidi_it_prev = it->bidi_it; | 6307 | *bidi_it_prev = it->bidi_it; |