From 14231463a49d445d5cb889897b2f5cc4b99fbe06 Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Tue, 24 Aug 2021 17:57:57 +0200 Subject: fix(bufupdates): send correct updates for visual paste MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit One step further towards stable tree-sitter. Co-authored-by: Björn Linse --- src/nvim/ops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/ops.c b/src/nvim/ops.c index 178b454e4e..a06db4a551 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -3444,8 +3444,9 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags) (int)y_size-1, lastsize, totsize, kExtmarkUndo); } else if (y_type == kMTLineWise && flags & PUT_LINE_SPLIT) { - extmark_splice(curbuf, (int)new_cursor.lnum-1, col, 0, 0, 0, - (int)y_size+1, 0, totsize+1, kExtmarkUndo); + // Account for last pasted NL + last NL + extmark_splice(curbuf, (int)new_cursor.lnum-1, col + 1, 0, 0, 0, + (int)y_size+1, 0, totsize+2, kExtmarkUndo); } } -- cgit