From 0b15c019124965920c5f2df8c8ee75cd46311d27 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sat, 2 Jul 2022 06:32:24 +0800 Subject: vim-patch:9.0.0017: accessing memory beyond the end of the line Problem: Accessing memory beyond the end of the line. Solution: Stop Visual mode when closing a window. https://github.com/vim/vim/commit/3d51ce18ab1be4f9f6061568a4e7fabf00b21794 --- src/nvim/testdir/test_visual.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/nvim/testdir/test_visual.vim') diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 41c29c5bb0..492750fa66 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1431,5 +1431,17 @@ func Test_visual_paste_clipboard() bwipe! endfunc +func Test_visual_area_adjusted_when_hiding() + " The Visual area ended after the end of the line after :hide + call setline(1, 'xxx') + vsplit Xfile + call setline(1, 'xxxxxxxx') + norm! $o + hid + norm! zW + bwipe! + bwipe! +endfunc + " vim: shiftwidth=2 sts=2 expandtab -- cgit