diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-30 23:51:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-30 23:51:52 +1200 |
commit | 098f1df21e89d2d0ad9feeb19d7930cba6051b00 (patch) | |
tree | 5ddbc5da3a38153efaf5c39665177ecc346eeff7 | |
parent | Merge branch 'release/v6.0.0' (diff) | |
download | vim-insert-cancel-098f1df21e89d2d0ad9feeb19d7930cba6051b00.tar.gz vim-insert-cancel-098f1df21e89d2d0ad9feeb19d7930cba6051b00.zip |
Set change number cache on buffer entry
-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 |