aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Tipling <bjorn@ambientchill.com>2014-11-24 13:53:21 -0800
committerBjorn Tipling <bjorn@ambientchill.com>2014-11-24 13:53:21 -0800
commitfe27cbe1d81d9ededc84df3ee3da5094cfc8cdf5 (patch)
tree24c43548f9e94c0a03d6ca65610cdc62048c2628
parent657601a04c589eefbc1080aae9de2e99f103bd30 (diff)
downloadrneovim-fe27cbe1d81d9ededc84df3ee3da5094cfc8cdf5.tar.gz
rneovim-fe27cbe1d81d9ededc84df3ee3da5094cfc8cdf5.tar.bz2
rneovim-fe27cbe1d81d9ededc84df3ee3da5094cfc8cdf5.zip
Print an error and exit when there are no plugins.
Issue: #1537 Running the :UpdateRemotePlugins command will show an ugly, unhelpful error when no plugins were found. This change has neovim print an error message and does not attempt to start the python-client which requires at least one plugin.
-rw-r--r--runtime/autoload/remote/host.vim5
1 files changed, 5 insertions, 0 deletions
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index 54a8bb3c41..e81aa81665 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -121,6 +121,11 @@ function! s:RegistrationCommands(host)
call remote#host#RegisterClone(host_id, a:host)
let pattern = s:plugin_patterns[a:host]
let paths = globpath(&rtp, 'rplugin/'.a:host.'/'.pattern, 0, 1)
+ if len(paths) < 1
+ echom "Could not find any plugins when attempting to register plugin "
+ \ ."commands. See :he remote-plugin"
+ return []
+ endif
for path in paths
call remote#host#RegisterPlugin(host_id, path, [])
endfor