aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsgur <sgurrr@gmail.com>2020-01-14 16:28:05 +0900
committersgur <sgurrr@gmail.com>2020-01-14 16:28:05 +0900
commit4d00bdb4b7e60e0466d3a6e5791779f8ebe7d8fc (patch)
tree758f9f246edcd2f472f42786ff8b7ee09bf1bfa7
parent0925277597e5db0e4b601aecc290b79db239b174 (diff)
downloadvim-sonictemplate-4d00bdb4b7e60e0466d3a6e5791779f8ebe7d8fc.tar.gz
vim-sonictemplate-4d00bdb4b7e60e0466d3a6e5791779f8ebe7d8fc.tar.bz2
vim-sonictemplate-4d00bdb4b7e60e0466d3a6e5791779f8ebe7d8fc.zip
Prefix noautocmd to normal! commands which trigger TextChange events.
Fix #38
-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