Commit 56968aa6 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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.
parent 61dcf9bc
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> 2014-07-13 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (decode_mode_spec): Call file-remote-p on the current * 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) ...@@ -9351,7 +9351,7 @@ move_it_vertically_backward (struct it *it, int dy)
   
/* Estimate how many newlines we must move back. */ /* Estimate how many newlines we must move back. */
nlines = max (1, dy / default_line_pixel_height (it->w)); 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; pos_limit = BEGV;
else else
pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); pos_limit = max (start_pos - nlines * nchars_per_row, BEGV);
...@@ -9606,7 +9606,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) ...@@ -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 /* Go back -DVPOS buffer lines, but no farther than -DVPOS full
screen lines, and reseat the iterator there. */ screen lines, and reseat the iterator there. */
start_charpos = IT_CHARPOS (*it); start_charpos = IT_CHARPOS (*it);
if (it->line_wrap == TRUNCATE) if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
pos_limit = BEGV; pos_limit = BEGV;
else else
pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment