diff options
Diffstat (limited to 'plugin/insert_cancel.vim')
-rw-r--r-- | plugin/insert_cancel.vim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugin/insert_cancel.vim b/plugin/insert_cancel.vim index 540031b..d8c2c9b 100644 --- a/plugin/insert_cancel.vim +++ b/plugin/insert_cancel.vim @@ -12,10 +12,11 @@ if exists('loaded_insert_cancel') || &compatible || v:version < 700 endif let loaded_insert_cancel = 1 -" Each time the cursor moves in normal mode, cache the current change number +" On entering a buffer, and then each time the cursor moves in normal mode, +" cache the current change number augroup insert_cancel autocmd! - autocmd CursorMoved * + autocmd BufEnter,CursorMoved * \ let b:insert_cancel_changenr = changenr() augroup END |