From 432dee69828c57d4ade17fd80e50c0412684fee0 Mon Sep 17 00:00:00 2001 From: blyoa Date: Tue, 27 Sep 2016 19:09:20 +0900 Subject: [PATCH] Avoid doautocmd warning --- autoload/vimtex/latexmk.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autoload/vimtex/latexmk.vim b/autoload/vimtex/latexmk.vim index 2cbcef7..8196fd3 100644 --- a/autoload/vimtex/latexmk.vim +++ b/autoload/vimtex/latexmk.vim @@ -207,7 +207,9 @@ function! vimtex#latexmk#compile() " {{{1 call s:latexmk_set_pid() call vimtex#echo#status(['latexmk compile: ', \ ['VimtexSuccess', 'started continuous mode']]) - doautocmd User VimtexEventCompileStarted + if exists('#User#VimtexEventCompileStarted') + doautocmd User VimtexEventCompileStarted + endif else if get(l:exe, 'bg', 1) call vimtex#echo#status(['latexmk compile: ', @@ -523,7 +525,9 @@ function! vimtex#latexmk#stop() " {{{1 call s:latexmk_kill(b:vimtex) call vimtex#echo#status(['latexmk compile: ', \ ['VimtexSuccess', 'stopped (' . b:vimtex.base . ')']]) - doautocmd User VimtexEventCompileStopped + if exists('#User#VimtexEventCompileStopped') + doautocmd User VimtexEventCompileStopped + endif else call vimtex#echo#status(['latexmk compile: ', \ ['VimtexWarning', 'no process to stop (' . b:vimtex.base . ')']])