summaryrefslogtreecommitdiffstats
path: root/src/change.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-05-16 19:40:59 +0100
committerBram Moolenaar <Bram@vim.org>2022-05-16 19:40:59 +0100
commit7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 (patch)
treed40856d0b0eb3723b94a0543db98cd8d96cb2d50 /src/change.c
parent60ae0e71490c97f2871a6344aca61cacf220f813 (diff)
patch 8.2.4969: changing text in Visual mode may cause invalid memory accessv8.2.4969
Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
Diffstat (limited to 'src/change.c')
-rw-r--r--src/change.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/change.c b/src/change.c
index a9c3e19f4c..47411ca59b 100644
--- a/src/change.c
+++ b/src/change.c
@@ -548,6 +548,9 @@ changed_common(
curwin->w_changelistidx = curbuf->b_changelistlen;
}
+ if (VIsual_active)
+ check_visual_pos();
+
FOR_ALL_TAB_WINDOWS(tp, wp)
{
if (wp->w_buffer == curbuf)