Mercurial > vim
diff 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 |
line wrap: on
line diff
--- 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