diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-06 23:01:25 -0400 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-09-06 23:27:14 -0400 |
commit | a96b3677c689c8382dde20cb8919bf0dab12a3aa (patch) | |
tree | f9d166b2b9d3dfcf3c49e160ed01cd62da9524d4 /src/nvim/testdir/test_edit.vim | |
parent | 158b78062e9daa65203b4591dae733dd6c11ad2c (diff) | |
download | rneovim-a96b3677c689c8382dde20cb8919bf0dab12a3aa.tar.gz rneovim-a96b3677c689c8382dde20cb8919bf0dab12a3aa.tar.bz2 rneovim-a96b3677c689c8382dde20cb8919bf0dab12a3aa.zip |
vim-patch:8.1.1988: :startinsert! does not work the same way as "A"
Problem: :startinsert! does not work the same way as "A".
Solution: Use the same code to move the cursor. (closes vim/vim#4896)
https://github.com/vim/vim/commit/8d3b51084a5bdcd2ee9e31bc03cba0d16c43d428
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
-rw-r--r-- | src/nvim/testdir/test_edit.vim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 1010ae4e09..98fa9a3c47 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -1484,3 +1484,18 @@ func Test_edit_special_chars() close! endfunc + +func Test_edit_startinsert() + new + set backspace+=start + call setline(1, 'foobar') + call feedkeys("A\<C-U>\<Esc>", 'xt') + call assert_equal('', getline(1)) + + call setline(1, 'foobar') + call feedkeys(":startinsert!\<CR>\<C-U>\<Esc>", 'xt') + call assert_equal('', getline(1)) + + set backspace& + bwipe! +endfunc |