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:
@@ -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
|
||||
|
Reference in New Issue
Block a user