summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_edit.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-09-05 21:29:01 +0200
committerBram Moolenaar <Bram@vim.org>2019-09-05 21:29:01 +0200
commit8d3b51084a5bdcd2ee9e31bc03cba0d16c43d428 (patch)
tree9d639842238d3d284834750ef03b4bc6e550903e /src/testdir/test_edit.vim
parenta0d1fef4ebb693696464c5e22e33269f724b8e0e (diff)
patch 8.1.1988: :startinsert! does not work the same way as "A"v8.1.1988
Problem: :startinsert! does not work the same way as "A". Solution: Use the same code to move the cursor. (closes #4896)
Diffstat (limited to 'src/testdir/test_edit.vim')
-rw-r--r--src/testdir/test_edit.vim15
1 files changed, 15 insertions, 0 deletions
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\<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