Mercurial > vim
diff runtime/doc/autocmd.txt @ 4448:ba53304245f0 v7.3.972
updated for version 7.3.972
Problem: Cursor not restored after InsertEnter autocommand if it moved to
another line.
Solution: Also restore if the saved line number is still valid. Allow
setting v:char to skip restoring.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 19 May 2013 21:15:15 +0200 |
parents | 2d1383658bb4 |
children | 605c9ce57ec3 |
line wrap: on
line diff
--- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -691,8 +691,11 @@ InsertCharPre When a character is type InsertEnter Just before starting Insert mode. Also for Replace mode and Virtual Replace mode. The |v:insertmode| variable indicates the mode. - Be careful not to move the cursor or do - anything else that the user does not expect. + Be careful not to do anything else that the + user does not expect. + The cursor is restored afterwards. If you do + not want that set |v:char| to a non-empty + string. *InsertLeave* InsertLeave When leaving Insert mode. Also when using CTRL-O |i_CTRL-O|. But not for |i_CTRL-C|.