diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-02 14:30:01 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2018-07-02 14:30:01 +1200 |
commit | a7aa9d44a7dc4f604c68a1b51eb66d6c4e2789a4 (patch) | |
tree | d37d37bd108438687ff20f901ca51bf672ca7d14 | |
parent | First commit (diff) | |
parent | Bump VERSION (diff) | |
download | vim-insert-cancel-a7aa9d44a7dc4f604c68a1b51eb66d6c4e2789a4.tar.gz vim-insert-cancel-a7aa9d44a7dc4f604c68a1b51eb66d6c4e2789a4.zip |
Merge branch 'hotfix/v0.1.1'v0.1.1
* hotfix/v0.1.1:
Bump VERSION
Initialise variable to soothe vint
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | plugin/insert_cancel.vim | 5 |
2 files changed, 5 insertions, 2 deletions
@@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/plugin/insert_cancel.vim b/plugin/insert_cancel.vim index c5af7e2..636a54e 100644 --- a/plugin/insert_cancel.vim +++ b/plugin/insert_cancel.vim @@ -14,6 +14,9 @@ if v:version < 600 endif let g:loaded_insert_cancel = 1 +" Initialise s:changenr so vint understands +let s:changenr = 0 + " InsertEnter is only available from Vim 7 if has('autocmd') && v:version > 700 augroup insert_cancel @@ -25,7 +28,7 @@ endif " Try to figure out whether we made a change to undo, undo it if so function! s:InsertCancel() - if &modified && (!exists('s:changenr') || changenr() > s:changenr) + if &modified && (!exists('*changenr') || changenr() > s:changenr) silent undo endif endfunction |