aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-10-02 06:55:43 +0800
committerGitHub <noreply@github.com>2024-10-01 22:55:43 +0000
commit0e484c2041f9196f61c2b5dfaed38e81d068680d (patch)
treeedee0fe4f8dcda5844502e3e062c161cca098307 /src
parent5331f87f6145f705c73c5c23f365cecb9fbc5067 (diff)
downloadrneovim-0e484c2041f9196f61c2b5dfaed38e81d068680d.tar.gz
rneovim-0e484c2041f9196f61c2b5dfaed38e81d068680d.tar.bz2
rneovim-0e484c2041f9196f61c2b5dfaed38e81d068680d.zip
vim-patch:9.1.0753: Wrong display when typing in diff mode with 'smoothscroll' (#30614)
Problem: Wrong display when typing in diff mode with 'smoothscroll'. Solution: Use adjust_plines_for_skipcol() (zeertzjq). closes: vim/vim#15776 https://github.com/vim/vim/commit/47f8584a80006cd25e7dc6fa7fb1bfe2e768403c
Diffstat (limited to 'src')
-rw-r--r--src/nvim/drawscreen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c
index 025d8fe721..aa5c66465b 100644
--- a/src/nvim/drawscreen.c
+++ b/src/nvim/drawscreen.c
@@ -1805,8 +1805,10 @@ static void win_update(win_T *wp)
// Correct the first entry for filler lines at the top
// when it won't get updated below.
if (win_may_fill(wp) && bot_start > 0) {
- wp->w_lines[0].wl_size = (uint16_t)(plines_win_nofill(wp, wp->w_topline, true)
- + wp->w_topfill);
+ int n = plines_win_nofill(wp, wp->w_topline, false) + wp->w_topfill
+ - adjust_plines_for_skipcol(wp);
+ n = MIN(n, wp->w_height_inner);
+ wp->w_lines[0].wl_size = (uint16_t)n;
}
}
}