diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-04-01 08:19:19 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-04-01 08:19:19 +0000 |
commit | e4d5ad1d90c9601115338369f0c3bcc572d58b6a (patch) | |
tree | 3162866caf66c8f1cfdfb07a2f9e75977b6247f8 | |
parent | b6f7e1ef7aeedf6aea759af9cd9b04dde3670352 (diff) | |
download | emacs-e4d5ad1d90c9601115338369f0c3bcc572d58b6a.tar.gz |
(redisplay): In previous change, handle case where no newline follows.
-rw-r--r-- | src/xdisp.c | 12 |
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 () int left = XFASTINT (w->left); int *charstart_next_line = FRAME_CURRENT_GLYPHS (XFRAME (WINDOW_FRAME (w)))->charstarts[this_line_vpos + 1]; - int adjust = Z - tlendpos + 1 - charstart_next_line[left]; int i; + int adjust; + + if (Z - tlendpos == ZV) + /* This line ends at end of (accessible part of) buffer. + There is no newline to count. */ + adjust = Z - tlendpos - charstart_next_line[left]; + else + /* This line ends in a newline. + Must take account of the newline and the rest of the + text that follows. */ + adjust = Z - tlendpos + 1 - charstart_next_line[left]; adjust_window_charstarts (w, this_line_vpos, adjust); |