vim-patch:8.2.4217: illegal memory access when undo makes Visual area invalid

Problem:    Illegal memory access when undo makes Visual area invalid.
Solution:   Correct the Visual area after undo.
8d02ce1ed7

vim-patch:8.2.4218: illegal memory access with bracketed paste in Ex mode (N/A)
This commit is contained in:
Christian Clason
2022-01-26 16:40:54 +01:00
parent b2b288f33c
commit e9247b0d5d
2 changed files with 19 additions and 0 deletions

View File

@@ -2633,6 +2633,10 @@ static void u_undo_end(bool did_undo, bool absolute, bool quiet)
}
}
if (VIsual_active) {
check_pos(curbuf, &VIsual);
}
smsg_attr_keep(0,
_("%" PRId64 " %s; %s #%" PRId64 " %s"),
u_oldcount < 0 ? (int64_t)-u_oldcount : (int64_t)u_oldcount,