diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-01-26 16:40:54 +0100 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2022-01-26 22:01:19 +0100 |
commit | e9247b0d5da8f2158b8a64c736919faa7d708519 (patch) | |
tree | 8618144aa1c2038e8a3acb37364f5863dbb0314e /src/nvim/undo.c | |
parent | b2b288f33c7a8e780654d5f883dfc2948ff7edc3 (diff) | |
download | rneovim-e9247b0d5da8f2158b8a64c736919faa7d708519.tar.gz rneovim-e9247b0d5da8f2158b8a64c736919faa7d708519.tar.bz2 rneovim-e9247b0d5da8f2158b8a64c736919faa7d708519.zip |
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.
https://github.com/vim/vim/commit/8d02ce1ed75d008c34a5c9aaa51b67cbb9d33baa
vim-patch:8.2.4218: illegal memory access with bracketed paste in Ex mode (N/A)
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index d18f35a43a..2d8df4cad8 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -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, |