aboutsummaryrefslogtreecommitdiff
path: root/autoload/paste_insert.vim
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/paste_insert.vim')
-rw-r--r--autoload/paste_insert.vim5
1 files changed, 2 insertions, 3 deletions
diff --git a/autoload/paste_insert.vim b/autoload/paste_insert.vim
index b5e36a0..5b26875 100644
--- a/autoload/paste_insert.vim
+++ b/autoload/paste_insert.vim
@@ -9,13 +9,12 @@ function! paste_insert#() abort
autocmd User Start
\ call s:Start()
- " When starting insert mode, add completion hook for when we leave
+ " On insert mode start, add leaving hook to complete operation
autocmd InsertEnter *
\ autocmd paste_insert InsertLeave *
\ doautocmd paste_insert User Complete
- " User changed the text somehow, presumably a paste, so complete the
- " operation; use the new TextChanged event if we've got it
+ " Text changed outside insert mode, complete operation
if exists('##TextChanged')
autocmd TextChanged *
\ doautocmd paste_insert User Complete