aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2015-07-05 19:21:08 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2015-07-10 22:11:13 +0200
commit73d9cd85df478e98a5d229087489c808a6fbb9a4 (patch)
tree0ee69a40eb338c80de9562e3c53531b78e530de2
parentba2f7a9310bf3d3d0b028ad38e9724553e68c064 (diff)
downloadrneovim-73d9cd85df478e98a5d229087489c808a6fbb9a4.tar.gz
rneovim-73d9cd85df478e98a5d229087489c808a6fbb9a4.tar.bz2
rneovim-73d9cd85df478e98a5d229087489c808a6fbb9a4.zip
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
-rw-r--r--runtime/autoload/remote/host.vim2
1 files changed, 1 insertions, 1 deletions
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'