From a96b3677c689c8382dde20cb8919bf0dab12a3aa Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Fri, 6 Sep 2019 23:01:25 -0400 Subject: 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 --- src/nvim/testdir/test_edit.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/nvim/testdir') 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\\", 'xt') + call assert_equal('', getline(1)) + + call setline(1, 'foobar') + call feedkeys(":startinsert!\\\", 'xt') + call assert_equal('', getline(1)) + + set backspace& + bwipe! +endfunc -- cgit