+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
/* 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);
/* 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);