diff options
Diffstat (limited to 'test/old/testdir/test_autocmd.vim')
-rw-r--r-- | test/old/testdir/test_autocmd.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/old/testdir/test_autocmd.vim b/test/old/testdir/test_autocmd.vim index cdcd68f3d6..9132e0fdce 100644 --- a/test/old/testdir/test_autocmd.vim +++ b/test/old/testdir/test_autocmd.vim @@ -2010,6 +2010,21 @@ func Test_Cmdline() au! CmdlineEnter au! CmdlineLeave let &shellslash = save_shellslash + + au! CursorMovedC : let g:pos = getcmdpos() + let g:pos = 0 + call feedkeys(":hello\<Left>\<ESC>", 'xt') + call assert_equal(5, g:pos) + call feedkeys(":12345678\<C-R>=setcmdpos(3)\<CR>\<ESC>", 'xt') + call assert_equal(3, g:pos) + au! CursorMovedC + + " CursorMovedC changes the cursor position. + au! CursorMovedC : let g:pos = getcmdpos() | call setcmdpos(getcmdpos()-1) + let g:pos = 0 + call feedkeys(":hello\<Left>\<ESC>", 'xt') + call assert_equal(5, g:pos) + au! CursorMovedC endfunc " Test for BufWritePre autocommand that deletes or unloads the buffer. |