diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-03-08 12:11:07 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-08 12:11:07 +0800 |
| commit | be368a6f7489becf463900bd88239cca6e64f37d (patch) | |
| tree | ae283877ddf1dc62303e7ffff558447e0c774309 /src/nvim/ex_cmds.c | |
| parent | 6e31a3a51e686c80b9dbb2d4f151b0ae68bf0435 (diff) | |
| parent | c624f260d37f1fea8c105c140fcb5157730355df (diff) | |
Merge pull request #17647 from neovim/backport-16851-to-release-0.6release-0.6
[Backport release-0.6] 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 77944851d2..e6ec4ceb3b 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3009,7 +3009,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; |
