summaryrefslogtreecommitdiff
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-02 17:31:24 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-02 17:31:24 +0100
commitf8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0 (patch)
treed7df98b978429b58403e670f2ce56b173aecf819 /src/ops.c
parent5e1e6d265d26ee2952c4a018a5ff72c950d2d700 (diff)
downloadvim-git-f8eb9c51e5bbd10e59c9b1247f8f6c7f5b77ccd0.tar.gz
patch 8.0.0140v8.0.0140
Problem: Pasting inserted text in Visual mode does not work properly. (Matthew Malcomson) Solution: Stop Visual mode before stuffing the inserted text. (Christian Brabandt, from neovim #5709)
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ops.c b/src/ops.c
index f966cb964..0853fd0d0 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3351,6 +3351,8 @@ do_put(
*/
if (regname == '.')
{
+ if (VIsual_active)
+ stuffcharReadbuff(VIsual_mode);
(void)stuff_inserted((dir == FORWARD ? (count == -1 ? 'o' : 'a') :
(count == -1 ? 'O' : 'i')), count, FALSE);
/* Putting the text is done later, so can't really move the cursor to