comparison src/testdir/test_edit.vim @ 17984:2ea47dee7ddd v8.1.1988

patch 8.1.1988: :startinsert! does not work the same way as "A" Commit: https://github.com/vim/vim/commit/8d3b51084a5bdcd2ee9e31bc03cba0d16c43d428 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 5 21:29:01 2019 +0200 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 https://github.com/vim/vim/issues/4896)
author Bram Moolenaar <Bram@vim.org>
date Thu, 05 Sep 2019 21:30:03 +0200
parents 4935244c1128
children 7dd83b5325e9
comparison
equal deleted inserted replaced
17983:9814aa081796 17984:2ea47dee7ddd
1478 exe "normal " . t 1478 exe "normal " . t
1479 call assert_equal("ABC !a\<C-O>g\<C-G>8", getline(2)) 1479 call assert_equal("ABC !a\<C-O>g\<C-G>8", getline(2))
1480 1480
1481 close! 1481 close!
1482 endfunc 1482 endfunc
1483
1484 func Test_edit_startinsert()
1485 new
1486 set backspace+=start
1487 call setline(1, 'foobar')
1488 call feedkeys("A\<C-U>\<Esc>", 'xt')
1489 call assert_equal('', getline(1))
1490
1491 call setline(1, 'foobar')
1492 call feedkeys(":startinsert!\<CR>\<C-U>\<Esc>", 'xt')
1493 call assert_equal('', getline(1))
1494
1495 set backspace&
1496 bwipe!
1497 endfunc