diff options
| author | Gerd Moellmann | 2002-03-08 12:28:17 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2002-03-08 12:28:17 +0000 |
| commit | 555919764bb847f6957cf8659fcbfe06fcca98cd (patch) | |
| tree | 8bc9923ef639d67749da7aca89cfc1cf6920b58c /src | |
| parent | 0d121f7c6a7f2c60bf73e66ef63667b35ab43840 (diff) | |
| download | emacs-555919764bb847f6957cf8659fcbfe06fcca98cd.tar.gz emacs-555919764bb847f6957cf8659fcbfe06fcca98cd.zip | |
(move_it_vertically_backward): At the end of the
function, when moving forward by lines, treat terminal frames
specially.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index b1b2fd6bc59..4760893d284 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -5404,12 +5404,24 @@ move_it_vertically_backward (it, dy) | |||
| 5404 | else if (target_y >= it->current_y + line_height | 5404 | else if (target_y >= it->current_y + line_height |
| 5405 | && IT_CHARPOS (*it) < ZV) | 5405 | && IT_CHARPOS (*it) < ZV) |
| 5406 | { | 5406 | { |
| 5407 | /* Should move forward by at least one line, maybe more. */ | 5407 | /* Should move forward by at least one line, maybe more. |
| 5408 | do | 5408 | |
| 5409 | Note: Calling move_it_by_lines can be expensive on | ||
| 5410 | terminal frames, where compute_motion is used (via | ||
| 5411 | vmotion) to do the job, when there are very long lines | ||
| 5412 | and truncate-lines is nil. That's the reason for | ||
| 5413 | treating terminal frames specially here. */ | ||
| 5414 | |||
| 5415 | if (!FRAME_WINDOW_P (it->f)) | ||
| 5416 | move_it_vertically (it, target_y - (it->current_y + line_height)); | ||
| 5417 | else | ||
| 5409 | { | 5418 | { |
| 5410 | move_it_by_lines (it, 1, 1); | 5419 | do |
| 5420 | { | ||
| 5421 | move_it_by_lines (it, 1, 1); | ||
| 5422 | } | ||
| 5423 | while (target_y >= line_bottom_y (it) && IT_CHARPOS (*it) < ZV); | ||
| 5411 | } | 5424 | } |
| 5412 | while (target_y >= line_bottom_y (it) && IT_CHARPOS (*it) < ZV); | ||
| 5413 | 5425 | ||
| 5414 | xassert (IT_CHARPOS (*it) >= BEGV); | 5426 | xassert (IT_CHARPOS (*it) >= BEGV); |
| 5415 | } | 5427 | } |