1
0
forked from aniani/vim

patch 8.2.3952: first line not redrawn when adding lines to an empty buffer

Problem:    First line not redrawn when adding lines to an empty buffer.
Solution:   Adjust the argument to appended_lines(). (closes #9439,
            closes #9438)
This commit is contained in:
zeertzjq
2021-12-31 12:19:22 +00:00
committed by Bram Moolenaar
parent 04fb916684
commit 1fa3de1ce8
3 changed files with 51 additions and 1 deletions

View File

@@ -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;