diff options
author | Daniel Hahler <git@thequod.de> | 2019-08-20 04:52:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 04:52:56 +0200 |
commit | 57e19ea846ac2821e308029b4569cffa0a1fd41f (patch) | |
tree | 2652377de856c61c603ca2df9ff75a2ed3e64dd0 /src/nvim/normal.c | |
parent | 7fa49627e583e1020919760ad37cf4c1639469da (diff) | |
parent | ec9b57cb6e6679b7f08001677fc523a5d0a2a819 (diff) | |
download | rneovim-57e19ea846ac2821e308029b4569cffa0a1fd41f.tar.gz rneovim-57e19ea846ac2821e308029b4569cffa0a1fd41f.tar.bz2 rneovim-57e19ea846ac2821e308029b4569cffa0a1fd41f.zip |
Merge pull request #10814 from janlazo/vim-8.1.1887
vim-patch:8.1.{1887,1890}
Diffstat (limited to 'src/nvim/normal.c')
-rw-r--r-- | src/nvim/normal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/normal.c b/src/nvim/normal.c index 73841cf449..bfd91e688e 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -7827,13 +7827,15 @@ static void nv_put_opt(cmdarg_T *cap, bool fix_indent) // 'virtualedit' and past the end of the line, we use the 'c' operator in // do_put(), which requires the visual selection to still be active. if (!VIsual_active || VIsual_mode == 'V' || regname != '.') { - // Now delete the selected text. + // Now delete the selected text. Avoid messages here. cap->cmdchar = 'd'; cap->nchar = NUL; cap->oap->regname = NUL; + msg_silent++; nv_operator(cap); do_pending_operator(cap, 0, false); empty = (curbuf->b_ml.ml_flags & ML_EMPTY); + msg_silent--; // delete PUT_LINE_BACKWARD; cap->oap->regname = regname; @@ -7882,6 +7884,7 @@ static void nv_put_opt(cmdarg_T *cap, bool fix_indent) * line that needs to be deleted now. */ if (empty && *ml_get(curbuf->b_ml.ml_line_count) == NUL) { ml_delete(curbuf->b_ml.ml_line_count, true); + deleted_lines(curbuf->b_ml.ml_line_count + 1, 1); /* If the cursor was in that line, move it to the end of the last * line. */ |