aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-07-11 16:49:13 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-07-11 16:49:13 +1200
commit7d929d00df653399eae156745dbcb421a109a932 (patch)
treee1e4e9e7e6f65ea915ad72e4a8d125a93ccd7264
parent7de7e84a3c63a4b66e085ad4fb42d3e0b202c0fb (diff)
downloadvim-paste-insert-7d929d00df653399eae156745dbcb421a109a932.tar.gz
vim-paste-insert-7d929d00df653399eae156745dbcb421a109a932.zip
Correct legacy TextChanged test
-rw-r--r--autoload/paste_insert.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/paste_insert.vim b/autoload/paste_insert.vim
index 5b26875..49f630f 100644
--- a/autoload/paste_insert.vim
+++ b/autoload/paste_insert.vim
@@ -49,7 +49,7 @@ let s:cancel_keys = get(g:, 'paste_insert_cancel_keys', ['<C-C>', '<Esc>'])
" Start the paste: remap any cancel keys, set 'paste'
function! s:Start() abort
- if exists('##TextChanged')
+ if !exists('##TextChanged')
let b:paste_insert_changenr = changenr()
endif
for key in s:cancel_keys
@@ -65,7 +65,7 @@ endfunction
" Stop the paste: unset 'paste', restore prior function of cancel key
function! s:Stop() abort
- if exists('##TextChanged')
+ if !exists('##TextChanged')
unlet b:paste_insert_changenr
endif
set nopaste paste?