diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-03-26 09:24:04 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-26 09:24:04 +0800 |
commit | 4eef5ac453866dae7c03f5432fc8c4dfcda19f54 (patch) | |
tree | 5659978e15435ae63f445fabef685853e78b28ea /test/old/testdir/test_edit.vim | |
parent | e3dab4b32609c63adfbb6bb425a4b19c1ff95cde (diff) | |
download | rneovim-4eef5ac453866dae7c03f5432fc8c4dfcda19f54.tar.gz rneovim-4eef5ac453866dae7c03f5432fc8c4dfcda19f54.tar.bz2 rneovim-4eef5ac453866dae7c03f5432fc8c4dfcda19f54.zip |
vim-patch:9.0.1428: cursor in wrong position when leaving insert mode (#22786)
Problem: Cursor in wrong position when leaving insert mode.
Solution: Update the w_valid flags. Position the cursor also when not
redrawing. (closes vim/vim#12137)
https://github.com/vim/vim/commit/c174c2e58c9e24a75b189e01143e6d057b84e96e
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test/old/testdir/test_edit.vim')
-rw-r--r-- | test/old/testdir/test_edit.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/old/testdir/test_edit.vim b/test/old/testdir/test_edit.vim index e4c21d9932..24afda67f2 100644 --- a/test/old/testdir/test_edit.vim +++ b/test/old/testdir/test_edit.vim @@ -5,6 +5,7 @@ if exists("+t_kD") endif source check.vim +source screendump.vim " Needed for testing basic rightleft: Test_edit_rightleft source view_util.vim @@ -1978,6 +1979,22 @@ func Test_edit_insert_reg() close! endfunc +" Test for positioning cursor after CTRL-R expression failed +func Test_edit_ctrl_r_failed() + CheckRunVimInTerminal + + let buf = RunVimInTerminal('', #{rows: 6, cols: 60}) + + " trying to insert a dictionary produces an error + call term_sendkeys(buf, "i\<C-R>={}\<CR>") + + " ending Insert mode should put the cursor back on the ':' + call term_sendkeys(buf, ":\<Esc>") + call VerifyScreenDump(buf, 'Test_edit_ctlr_r_failed_1', {}) + + call StopVimInTerminal(buf) +endfunc + " When a character is inserted at the last position of the last line in a " window, the window contents should be scrolled one line up. If the top line " is part of a fold, then the entire fold should be scrolled up. |