summaryrefslogtreecommitdiff
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-12-31 12:19:22 +0000
committerBram Moolenaar <Bram@vim.org>2021-12-31 12:19:22 +0000
commit1fa3de1ce806ba18ebcc00c6d9a0678a84735463 (patch)
tree564e1bffe8e1b78c824b0935d6059a21765cb5f2 /src/ex_cmds.c
parent04fb916684829f6aa12f33f14d0d0023b458f200 (diff)
downloadvim-git-1fa3de1ce806ba18ebcc00c6d9a0678a84735463.tar.gz
patch 8.2.3952: first line not redrawn when adding lines to an empty bufferv8.2.3952
Problem: First line not redrawn when adding lines to an empty buffer. Solution: Adjust the argument to appended_lines(). (closes #9439, closes #9438)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 8595e8be0..c57f33255 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3359,7 +3359,11 @@ 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);
vim_free(theline);
++lnum;