aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-07-11 16:43:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-07-11 16:43:32 +1200
commitd5019233597a241385364be4ffd704bbed3a731f (patch)
treeb3157c2dc1d1ee0aa63431604e98fa390f61d049
parent21eeff50594ac4c1f79ed96315367bd9d0728845 (diff)
downloadvim-paste-insert-d5019233597a241385364be4ffd704bbed3a731f.tar.gz
vim-paste-insert-d5019233597a241385364be4ffd704bbed3a731f.zip
Improve comments
-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