aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/xdisp.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ca31b10fb6a..a664b12fe6e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12014-07-16 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (move_it_vertically_backward, move_it_by_lines): Prevent
4 infinite looping in redisplay when display lines don't have enough
5 space to display even a single character. (Bug#18036)
6
12014-07-13 Eli Zaretskii <eliz@gnu.org> 72014-07-13 Eli Zaretskii <eliz@gnu.org>
2 8
3 * xdisp.c (decode_mode_spec): Call file-remote-p on the current 9 * xdisp.c (decode_mode_spec): Call file-remote-p on the current
diff --git a/src/xdisp.c b/src/xdisp.c
index 2f0683294fa..263f499dbfa 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -9351,7 +9351,7 @@ move_it_vertically_backward (struct it *it, int dy)
9351 9351
9352 /* Estimate how many newlines we must move back. */ 9352 /* Estimate how many newlines we must move back. */
9353 nlines = max (1, dy / default_line_pixel_height (it->w)); 9353 nlines = max (1, dy / default_line_pixel_height (it->w));
9354 if (it->line_wrap == TRUNCATE) 9354 if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
9355 pos_limit = BEGV; 9355 pos_limit = BEGV;
9356 else 9356 else
9357 pos_limit = max (start_pos - nlines * nchars_per_row, BEGV); 9357 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 /* Go back -DVPOS buffer lines, but no farther than -DVPOS full 9606 /* Go back -DVPOS buffer lines, but no farther than -DVPOS full
9607 screen lines, and reseat the iterator there. */ 9607 screen lines, and reseat the iterator there. */
9608 start_charpos = IT_CHARPOS (*it); 9608 start_charpos = IT_CHARPOS (*it);
9609 if (it->line_wrap == TRUNCATE) 9609 if (it->line_wrap == TRUNCATE || nchars_per_row == 0)
9610 pos_limit = BEGV; 9610 pos_limit = BEGV;
9611 else 9611 else
9612 pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); 9612 pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV);