From 73d9cd85df478e98a5d229087489c808a6fbb9a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Linse?= Date: Sun, 5 Jul 2015 19:21:08 +0200 Subject: [PATCH] rplugin: Don't error if plugin is registered before host #2961 This makes it possible to register a lazy loaded host in a plugin/ file. Previously this caused an error on restart after :UpdateRemotePlugins --- runtime/autoload/remote/host.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim index ddbdc2d7f2..64f6ddb759 100644 --- a/runtime/autoload/remote/host.vim +++ b/runtime/autoload/remote/host.vim @@ -81,7 +81,7 @@ function! remote#host#RegisterPlugin(host, path, specs) endif endfor - if remote#host#IsRunning(a:host) + if has_key(s:hosts, a:host) && remote#host#IsRunning(a:host) " For now we won't allow registration of plugins when the host is already " running. throw 'Host "'.a:host.'" is already running'