aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-08-25 20:56:15 +0200
committerGitHub <noreply@github.com>2021-08-25 20:56:15 +0200
commit10d7d73b2dc6db081a8a1f405204d35cccb85196 (patch)
tree24e10654b176456dbe9e6225966869dce298f0da /src
parenta373ca1d826b1386f1fa291de70ee5d6bb81ec9b (diff)
parent14231463a49d445d5cb889897b2f5cc4b99fbe06 (diff)
downloadrneovim-10d7d73b2dc6db081a8a1f405204d35cccb85196.tar.gz
rneovim-10d7d73b2dc6db081a8a1f405204d35cccb85196.tar.bz2
rneovim-10d7d73b2dc6db081a8a1f405204d35cccb85196.zip
Merge pull request #15475 from vigoux/bufupdates-paste
Send correct byte updates on visual paste
Diffstat (limited to 'src')
-rw-r--r--src/nvim/ops.c5
1 files changed, 3 insertions, 2 deletions
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);
}
}