Hello Vim developers,
:startinsert should work like typing "i" in Normal mode (according to the help).
I found a small discrepancy while developing a custom mapping:
vim -N -u NONE
ifoo<Esc>
:echo string(@.) getpos("'[") getpos("']")
'foo' [0, 1, 1, 0] [0, 1, 4, 0]
i<Esc>
:echo string(@.) getpos("'[") getpos("']")
'' [0, 1, 3, 0] [0, 1, 3, 0]
:quit!
Contrast with:
vim -N -u NONE
:startinsert
foo<Esc>
:echo string(@.) getpos("'[") getpos("']")
'foo' [0, 1, 1, 0] [0, 1, 4, 0]
:startinsert
<Esc>
:echo string(@.) getpos("'[") getpos("']")
'foo' [0, 1, 1, 0] [0, 1, 4, 0]
:quit!
Note how neither register . nor the change marks are updated when using
:startinsert and no insertion took place (i.e. input mode was immediately left
via <Esc>).
Reproducible on Vim 7.3.000 (Windows 7, x86 and x64) as well as the latest
7.3.535 (big version, Linux/x86).
-- regards, ingo
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php