Mercurial > vim
diff src/drawscreen.c @ 32361:9ac987a467d5 v9.0.1512
patch 9.0.1512: inserting lines when scrolling with 'smoothscroll' set
Commit: https://github.com/vim/vim/commit/c8502f9b880b6d23baa4f9d28b60e1ceb442e35f
Author: Luuk van Baal <luukvbaal@gmail.com>
Date: Sat May 6 12:40:15 2023 +0100
patch 9.0.1512: inserting lines when scrolling with 'smoothscroll' set
Problem: Inserting lines when scrolling with 'smoothscroll' set.
Solution: Adjust line height computation for w_skipcol. (Luuk van Baal,
closes #12350)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 06 May 2023 13:45:04 +0200 |
parents | bb797331e21b |
children | 0632606a2530 |
line wrap: on
line diff
--- a/src/drawscreen.c +++ b/src/drawscreen.c @@ -2327,8 +2327,14 @@ win_update(win_T *wp) { #ifdef FEAT_DIFF if (l == wp->w_topline) - new_rows += plines_win_nofill(wp, l, TRUE) - + wp->w_topfill; + { + int n = plines_win_nofill(wp, l, FALSE) + + wp->w_topfill; + n = adjust_plines_for_skipcol(wp, n); + if (n > wp->w_height) + n = wp->w_height; + new_rows += n; + } else #endif new_rows += plines_win(wp, l, TRUE);