mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-09 15:50:21 +00:00
Fix bug #18036 with infloop in redisplay with huge fringes.
src/xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent infinite looping in redisplay when display lines don't have enough space to display even a single character.
This commit is contained in:
parent
61dcf9bc85
commit
56968aa61c
@ -1,3 +1,9 @@
|
||||
2014-07-16 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
|
||||
infinite looping in redisplay when display lines don't have enough
|
||||
space to display even a single character. (Bug#18036)
|
||||
|
||||
2014-07-13 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* xdisp.c (decode_mode_spec): Call file-remote-p on the current
|
||||
|
@ -9351,7 +9351,7 @@ move_it_vertically_backward (struct it *it, int dy)
|
||||
|
||||
/* Estimate how many newlines we must move back. */
|
||||
nlines = max (1, dy / default_line_pixel_height (it->w));
|
||||
if (it->line_wrap == TRUNCATE)
|
||||
if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
|
||||
pos_limit = BEGV;
|
||||
else
|
||||
pos_limit = max (start_pos - nlines * nchars_per_row, BEGV);
|
||||
@ -9606,7 +9606,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos)
|
||||
/* Go back -DVPOS buffer lines, but no farther than -DVPOS full
|
||||
screen lines, and reseat the iterator there. */
|
||||
start_charpos = IT_CHARPOS (*it);
|
||||
if (it->line_wrap == TRUNCATE)
|
||||
if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
|
||||
pos_limit = BEGV;
|
||||
else
|
||||
pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV);
|
||||
|
Loading…
Reference in New Issue
Block a user