diff options
Diffstat (limited to 'src/nvim/testdir/test_autocmd.vim')
-rw-r--r-- | src/nvim/testdir/test_autocmd.vim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_autocmd.vim b/src/nvim/testdir/test_autocmd.vim index 7645a27fdf..1c2f86a584 100644 --- a/src/nvim/testdir/test_autocmd.vim +++ b/src/nvim/testdir/test_autocmd.vim @@ -2190,6 +2190,17 @@ func Test_autocmd_nested_cursor_invalid() bwipe! endfunc +func Test_autocmd_nested_keeps_cursor_pos() + enew + call setline(1, 'foo') + autocmd User foo ++nested normal! $a + autocmd InsertLeave * : + doautocmd User foo + call assert_equal([0, 1, 3, 0], getpos('.')) + + bwipe! +endfunc + func Test_autocmd_nested_switch_window() " run this in a separate Vim so that SafeState works CheckRunVimInTerminal |