summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-01-25 13:52:53 +0000
committerBram Moolenaar <Bram@vim.org>2022-01-25 13:52:53 +0000
commitdc5490e2cbc8c16022a23b449b48c1bd0083f366 (patch)
tree5ce09149d3e81a253401460e4a46c1b98510a0d3 /src/ex_cmds.c
parent85b6747abc15a7a81086db31289cf1b8b17e6cb1 (diff)
patch 8.2.4215: illegal memory access when copying lines in Visual modev8.2.4215
Problem: Illegal memory access when copying lines in Visual mode. Solution: Adjust the Visual position after copying lines.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 95209985e1..f5d93e6645 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -866,6 +866,8 @@ ex_copy(linenr_T line1, linenr_T line2, linenr_T n)
}
appended_lines_mark(n, count);
+ if (VIsual_active)
+ check_pos(curbuf, &VIsual);
msgmore((long)count);
}