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.
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index d9f40f4..364670a 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -691,8 +691,11 @@
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|.