diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2021-01-28 19:25:31 +0100 |
---|---|---|
committer | Björn Linse <bjorn.linse@gmail.com> | 2021-02-08 19:08:42 +0100 |
commit | 3094bb4e3892b9b536d867d4cae0205046a888d4 (patch) | |
tree | c218e012f332aea62f4cbe9e07c0dd76f0e4b904 /src/nvim/ops.c | |
parent | b2b47e46187c59c9fcbfe31bdb2071af4c09a1a5 (diff) | |
download | rneovim-3094bb4e3892b9b536d867d4cae0205046a888d4.tar.gz rneovim-3094bb4e3892b9b536d867d4cae0205046a888d4.tar.bz2 rneovim-3094bb4e3892b9b536d867d4cae0205046a888d4.zip |
fix(buf_updates): send updates when putting past last line
Fixes #13710
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 87d092281a..ea52d6a3d3 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3422,15 +3422,11 @@ error: if (dir == FORWARD) curbuf->b_op_start.lnum++; } - // Skip mark_adjust when adding lines after the last one, there - // can't be marks there. - if (curbuf->b_op_start.lnum + (y_type == kMTCharWise) - 1 + nr_lines - < curbuf->b_ml.ml_line_count) { - ExtmarkOp kind = (y_type == kMTLineWise && !(flags & PUT_LINE_SPLIT)) - ? kExtmarkUndo : kExtmarkNOOP; - mark_adjust(curbuf->b_op_start.lnum + (y_type == kMTCharWise), - (linenr_T)MAXLNUM, nr_lines, 0L, kind); - } + + ExtmarkOp kind = (y_type == kMTLineWise && !(flags & PUT_LINE_SPLIT)) + ? kExtmarkUndo : kExtmarkNOOP; + mark_adjust(curbuf->b_op_start.lnum + (y_type == kMTCharWise), + (linenr_T)MAXLNUM, nr_lines, 0L, kind); // note changed text for displaying and folding if (y_type == kMTCharWise) { |