remote/host.vim: Avoid "No matching autocommands".

:silent does not silence this message, even :redir does not consume it.
But execute() _does_ consume it, which interferes with the current
implementation of health.vim. It's prudent to avoid it in any case, even
if the implementation of health.vim changes in the future.
This commit is contained in:
Justin M. Keyes 2016-08-21 16:15:50 -04:00
parent 45cc14d9a5
commit 297677ecf4
1 changed files with 3 additions and 1 deletions

View File

@ -178,7 +178,9 @@ endfunction
function! remote#host#LoadRemotePluginsEvent(event, pattern) abort
autocmd! nvim-rplugin
call remote#host#LoadRemotePlugins()
execute 'silent doautocmd <nomodeline>' a:event a:pattern
if exists('#'.a:event.'#'.a:pattern) " Avoid 'No matching autocommands'.
execute 'silent doautocmd <nomodeline>' a:event a:pattern
endif
endfunction