Mercurial > vim
comparison src/move.c @ 29239:da56650de132 v8.2.5138
patch 8.2.5138: various small issues
Commit: https://github.com/vim/vim/commit/8088ae95bbed2085c5fb196850c4e4b8df55c989
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jun 20 11:38:17 2022 +0100
patch 8.2.5138: various small issues
Problem: Various small issues.
Solution: Various small improvments.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Jun 2022 12:45:03 +0200 |
parents | 755ab148288b |
children | 281509f1417b |
comparison
equal
deleted
inserted
replaced
29238:ee6d7b2b9704 | 29239:da56650de132 |
---|---|
313 if (curwin->w_botline <= curbuf->b_ml.ml_line_count) | 313 if (curwin->w_botline <= curbuf->b_ml.ml_line_count) |
314 { | 314 { |
315 if (curwin->w_cursor.lnum < curwin->w_botline) | 315 if (curwin->w_cursor.lnum < curwin->w_botline) |
316 { | 316 { |
317 if (((long)curwin->w_cursor.lnum | 317 if (((long)curwin->w_cursor.lnum |
318 >= (long)curwin->w_botline - *so_ptr | 318 >= (long)curwin->w_botline - *so_ptr |
319 #ifdef FEAT_FOLDING | 319 #ifdef FEAT_FOLDING |
320 || hasAnyFolding(curwin) | 320 || hasAnyFolding(curwin) |
321 #endif | 321 #endif |
322 )) | 322 )) |
323 { | 323 { |
376 } | 376 } |
377 } | 377 } |
378 else | 378 else |
379 #endif | 379 #endif |
380 line_count = curwin->w_cursor.lnum - curwin->w_botline | 380 line_count = curwin->w_cursor.lnum - curwin->w_botline |
381 + 1 + *so_ptr; | 381 + 1 + *so_ptr; |
382 if (line_count <= curwin->w_height + 1) | 382 if (line_count <= curwin->w_height + 1) |
383 scroll_cursor_bot(scrolljump_value(), FALSE); | 383 scroll_cursor_bot(scrolljump_value(), FALSE); |
384 else | 384 else |
385 scroll_cursor_halfway(FALSE); | 385 scroll_cursor_halfway(FALSE); |
386 } | 386 } |
1984 } | 1984 } |
1985 } | 1985 } |
1986 | 1986 |
1987 /* | 1987 /* |
1988 * Recompute topline to put the cursor at the bottom of the window. | 1988 * Recompute topline to put the cursor at the bottom of the window. |
1989 * Scroll at least "min_scroll" lines. | 1989 * When scrolling scroll at least "min_scroll" lines. |
1990 * If "set_topbot" is TRUE, set topline and botline first (for "zb"). | 1990 * If "set_topbot" is TRUE, set topline and botline first (for "zb"). |
1991 * This is messy stuff!!! | 1991 * This is messy stuff!!! |
1992 */ | 1992 */ |
1993 void | 1993 void |
1994 scroll_cursor_bot(int min_scroll, int set_topbot) | 1994 scroll_cursor_bot(int min_scroll, int set_topbot) |