From 47dca26d9331d08a5ea9ce350a15db0fa86cfd6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Wed, 20 Jul 2016 20:29:42 +0200 Subject: [PATCH] Better handle warning wait for new files (#494) --- autoload/vimtex/echo.vim | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/autoload/vimtex/echo.vim b/autoload/vimtex/echo.vim index afffc31..90bfc3a 100644 --- a/autoload/vimtex/echo.vim +++ b/autoload/vimtex/echo.vim @@ -25,9 +25,13 @@ endfunction function! vimtex#echo#wait() " {{{1 if g:vimtex_echo_ignore_wait | return | endif - echohl VimtexMsg - call input('Press any key to continue ...') - echohl None + if filereadable(expand('%')) + echohl VimtexMsg + call input('Press any key to continue ...') + echohl None + else + sleep 1 + endif endfunction function! vimtex#echo#echo(message) " {{{1