0
0
mirror of https://github.com/vim/vim.git synced 2025-10-18 07:54:29 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-09-05 21:29:01 +02:00
parent a0d1fef4eb
commit 8d3b51084a
5 changed files with 45 additions and 20 deletions

View File

@@ -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