aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-07-02 14:30:01 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-07-02 14:30:01 +1200
commita7aa9d44a7dc4f604c68a1b51eb66d6c4e2789a4 (patch)
treed37d37bd108438687ff20f901ca51bf672ca7d14
parentFirst commit (diff)
parentBump VERSION (diff)
downloadvim-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--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