From 8d3b51084a5bdcd2ee9e31bc03cba0d16c43d428 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 5 Sep 2019 21:29:01 +0200 Subject: 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 #4896) --- src/testdir/test_edit.vim | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/testdir/test_edit.vim') diff --git a/src/testdir/test_edit.vim b/src/testdir/test_edit.vim index 799642d3db..6ee5848109 100644 --- a/src/testdir/test_edit.vim +++ b/src/testdir/test_edit.vim @@ -1480,3 +1480,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 v1.2.3