diff options
| author | Richard M. Stallman | 1994-04-01 08:19:19 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-04-01 08:19:19 +0000 |
| commit | ffd57920a371da13e5e41f0df59ae5ed3446849c (patch) | |
| tree | 178e049885697183114a3706c5d8fb0b2ccd58f8 /src | |
| parent | 745d94338aee4e564ad85f5f44a6951c2caefb4b (diff) | |
| download | emacs-ffd57920a371da13e5e41f0df59ae5ed3446849c.tar.gz emacs-ffd57920a371da13e5e41f0df59ae5ed3446849c.zip | |
(redisplay): In previous change, handle case where no newline follows.
Diffstat (limited to 'src')
| -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 () | |||
| 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 | ||