From 297677ecf42501d2bef45dd4f083002a0963b205 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 21 Aug 2016 16:15:50 -0400 Subject: [PATCH] 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. --- runtime/autoload/remote/host.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim index 065644121a..110f80297a 100644 --- a/runtime/autoload/remote/host.vim +++ b/runtime/autoload/remote/host.vim @@ -178,7 +178,9 @@ endfunction function! remote#host#LoadRemotePluginsEvent(event, pattern) abort autocmd! nvim-rplugin call remote#host#LoadRemotePlugins() - execute 'silent doautocmd ' a:event a:pattern + if exists('#'.a:event.'#'.a:pattern) " Avoid 'No matching autocommands'. + execute 'silent doautocmd ' a:event a:pattern + endif endfunction