diff src/change.c @ 28893:aa44d5842d6c v8.2.4969

patch 8.2.4969: changing text in Visual mode may cause invalid memory access Commit: https://github.com/vim/vim/commit/7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 16 19:40:59 2022 +0100 patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 May 2022 20:45:03 +0200
parents a04815de0bd3
children b57caac54649
line wrap: on
line diff
--- 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)