diff options
author | zeertzjq <zeertzjq@outlook.com> | 2021-08-02 05:29:58 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2021-08-02 05:41:17 +0800 |
commit | c24daf5a1013c629f82ba8d4a4de885d7986d982 (patch) | |
tree | 861a9b4d793027eea5d15e0b4bc57d032d2746bd /src/nvim/screen.c | |
parent | 68f0670dfca1dd4308815792cc09f0112d288b6d (diff) | |
download | rneovim-c24daf5a1013c629f82ba8d4a4de885d7986d982.tar.gz rneovim-c24daf5a1013c629f82ba8d4a4de885d7986d982.tar.bz2 rneovim-c24daf5a1013c629f82ba8d4a4de885d7986d982.zip |
vim-patch:8.2.3204: display garbled when 'cursorline' is set and lines wrap
Problem: Display garbled when 'cursorline' is set and lines wrap. (Gabriel
Dupras)
Solution: Avoid inserting lines twice.
https://github.com/vim/vim/commit/c9e7e344ed390d2a22afb88001b6aa80832d2541
Diffstat (limited to 'src/nvim/screen.c')
-rw-r--r-- | src/nvim/screen.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 1e81fc691d..2fc5777937 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -1383,10 +1383,12 @@ static void win_update(win_T *wp, Providers *providers) * up or down to minimize redrawing. * Don't do this when the change continues until the end. * Don't scroll when dollar_vcol >= 0, keep the "$". + * Don't scroll when redrawing the top, scrolled already above. */ if (lnum == mod_top && mod_bot != MAXLNUM - && !(dollar_vcol >= 0 && mod_bot == mod_top + 1)) { + && !(dollar_vcol >= 0 && mod_bot == mod_top + 1) + && row >= top_end) { int old_rows = 0; int new_rows = 0; int xtra_rows; |