aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-02 21:02:49 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-02 21:02:49 +1200
commit40fee8456a0e314e952228ebf7bf09077aadc493 (patch)
treed37d37bd108438687ff20f901ca51bf672ca7d14
parentFirst commit (diff)
parentBump VERSION (diff)
downloadvim-insert-cancel-40fee8456a0e314e952228ebf7bf09077aadc493.tar.gz
vim-insert-cancel-40fee8456a0e314e952228ebf7bf09077aadc493.zip
Merge branch 'hotfix/v0.1.1' into develop
* hotfix/v0.1.1: Bump VERSION Initialise variable to soothe vint
-rw-r--r--VERSION2
-rw-r--r--plugin/insert_cancel.vim5
2 files changed, 5 insertions, 2 deletions
diff --git a/VERSION b/VERSION
index 6e8bf73..17e51c3 100644
--- a/VERSION
+++ b/VERSION
@@ -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