From 6eec30ccfc09f0ea45c9ef86a77ca92a5fc4a1b9 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Tue, 15 Feb 2022 10:23:27 +0800 Subject: vim-patch:8.2.4154: ml_get error when exchanging windows in Visual mode Problem: ml_get error when exchanging windows in Visual mode. Solution: Correct end of Visual area when entering another buffer. https://github.com/vim/vim/commit/05b27615481e72e3b338bb12990fb3e0c2ecc2a9 --- src/nvim/testdir/test_visual.vim | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim index 04c7db38ef..4650d4e3df 100644 --- a/src/nvim/testdir/test_visual.vim +++ b/src/nvim/testdir/test_visual.vim @@ -1280,6 +1280,16 @@ func Test_visual_block_insert_round_off() bwipe! endfunc +" this was causing an ml_get error +func Test_visual_exchange_windows() + enew! + new + call setline(1, ['foo', 'bar']) + exe "normal G\gg\\OO\" + bwipe! + bwipe! +endfunc + " this was leaving the end of the Visual area beyond the end of a line func Test_visual_ex_copy_line() new -- cgit