aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index c537281fc17..cc3df113278 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -626,8 +626,18 @@ redisplay ()
626 int left = XFASTINT (w->left); 626 int left = XFASTINT (w->left);
627 int *charstart_next_line 627 int *charstart_next_line
628 = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[this_line_vpos + 1]; 628 = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[this_line_vpos + 1];
629 int adjust = Z - tlendpos + 1 - charstart_next_line[left];
630 int i; 629 int i;
630 int adjust;
631
632 if (Z - tlendpos == ZV)
633 /* This line ends at end of (accessible part of) buffer.
634 There is no newline to count. */
635 adjust = Z - tlendpos - charstart_next_line[left];
636 else
637 /* This line ends in a newline.
638 Must take account of the newline and the rest of the
639 text that follows. */
640 adjust = Z - tlendpos + 1 - charstart_next_line[left];
631 641
632 adjust_window_charstarts (w, this_line_vpos, adjust); 642 adjust_window_charstarts (w, this_line_vpos, adjust);
633 643