aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2020-01-14 18:26:58 +0900
committerGitHub <noreply@github.com>2020-01-14 18:26:58 +0900
commite972aa09aa158189c36913b62a4344cb3ca78c76 (patch)
tree758f9f246edcd2f472f42786ff8b7ee09bf1bfa7
parent0925277597e5db0e4b601aecc290b79db239b174 (diff)
parent4d00bdb4b7e60e0466d3a6e5791779f8ebe7d8fc (diff)
downloadvim-sonictemplate-e972aa09aa158189c36913b62a4344cb3ca78c76.tar.gz
vim-sonictemplate-e972aa09aa158189c36913b62a4344cb3ca78c76.tar.bz2
vim-sonictemplate-e972aa09aa158189c36913b62a4344cb3ca78c76.zip
Merge pull request #39 from sgur/fix/error_on_normal
Prefix noautocmd to "normal!" commands which trigger TextChange events.
-rw-r--r--autoload/sonictemplate.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/autoload/sonictemplate.vim b/autoload/sonictemplate.vim
index c857cc8..8fe6e1c 100644
--- a/autoload/sonictemplate.vim
+++ b/autoload/sonictemplate.vim
@@ -295,7 +295,7 @@ function! sonictemplate#apply(name, mode, ...) abort
let c = join(split(c, "\n"), "")
let oldindentexpr = &indentexpr
let &indentexpr = ''
- silent! exe "normal! a\<c-r>=c\<cr>"
+ noautocmd silent! exe "normal! a\<c-r>=c\<cr>"
let &indentexpr = oldindentexpr
return
else
@@ -373,7 +373,7 @@ function! sonictemplate#postfix()
call setline('.', line)
let oldindentexpr = &indentexpr
let &indentexpr = ''
- silent! exe "normal! a\<c-r>=c\<cr>"
+ noautocmd silent! exe "normal! a\<c-r>=c\<cr>"
let &indentexpr = oldindentexpr
endif
if stridx(c, '{{_cursor_}}') != -1