diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-06-06 06:34:02 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-06-06 06:37:27 +0800 |
commit | fc908b500683215085ee6c12b41aa227332b7bbe (patch) | |
tree | 55224edd080076a2ed5410fe7c24eeee1be87509 /src | |
parent | 9978a9996dae9b62763db6772e7f1f777caacb45 (diff) | |
download | rneovim-fc908b500683215085ee6c12b41aa227332b7bbe.tar.gz rneovim-fc908b500683215085ee6c12b41aa227332b7bbe.tar.bz2 rneovim-fc908b500683215085ee6c12b41aa227332b7bbe.zip |
vim-patch:9.0.1610: display is wrong when 'smoothscroll' is set
Problem: Display is wrong when 'smoothscroll' is set and scrolling multiple
lines.
Solution: Redraw with UPD_NOT_VALID when "skipcol" is or was set.
(closes vim/vim#12490, closes vim/vim#12468)
https://github.com/vim/vim/commit/d9a92dc70b20c76cef9ca186676583c92c14311c
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/move.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/nvim/move.c b/src/nvim/move.c index 5d817fd7aa..5934ad90e9 100644 --- a/src/nvim/move.c +++ b/src/nvim/move.c @@ -1344,7 +1344,6 @@ bool scrollup(long line_count, int byfold) int width1 = curwin->w_width_inner - curwin_col_off(); int width2 = width1 + curwin_col_off2(); unsigned size = 0; - linenr_T prev_topline = curwin->w_topline; const colnr_T prev_skipcol = curwin->w_skipcol; if (do_sms) { @@ -1397,9 +1396,9 @@ bool scrollup(long line_count, int byfold) } } - if (curwin->w_topline == prev_topline - || curwin->w_skipcol != prev_skipcol) { - // need to redraw because wl_size of the topline may now be invalid + if (prev_skipcol > 0 || curwin->w_skipcol > 0) { + // need to redraw more, because wl_size of the (new) topline may + // now be invalid redraw_later(curwin, UPD_NOT_VALID); } } else { |