diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2021-12-31 15:48:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-31 15:48:02 +0100 |
commit | dc3a16abfca2ea12de0192e0782cb0a03c6e6035 (patch) | |
tree | 7a7adaafae21d2eea7678e95c983de2eb9a29f8a /src/nvim/ex_cmds.c | |
parent | 991e872d800dbd983d57e4768734cefb13503ee7 (diff) | |
parent | ba7b30080fe933709269288338d96187f06eaf08 (diff) | |
download | rneovim-dc3a16abfca2ea12de0192e0782cb0a03c6e6035.tar.gz rneovim-dc3a16abfca2ea12de0192e0782cb0a03c6e6035.tar.bz2 rneovim-dc3a16abfca2ea12de0192e0782cb0a03c6e6035.zip |
Merge pull request #16851 from zeertzjq/vim-8.2.3952
vim-patch:8.2.3952: first line not redrawn when adding lines to an empty buffer
Diffstat (limited to 'src/nvim/ex_cmds.c')
-rw-r--r-- | src/nvim/ex_cmds.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index cc5ab1b554..95390b1a70 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3006,7 +3006,12 @@ void ex_append(exarg_T *eap) did_undo = true; ml_append(lnum, theline, (colnr_T)0, false); - appended_lines_mark(lnum + (empty ? 1 : 0), 1L); + if (empty) { + // there are no marks below the inserted lines + appended_lines(lnum, 1L); + } else { + appended_lines_mark(lnum, 1L); + } xfree(theline); ++lnum; |