From c6b473f5593a1cb9e567bb1a9a897f196f1f720a Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sun, 5 Apr 2015 20:14:56 +1200 Subject: [PATCH] Handle wrong rtp more gracefully If the runtimepath has been set incorrectly and the autoload file is getting loaded by something, then the code won't be able to load the "plugin" file. Print a warning message and stop loading the file instead of throwing lots of errors. --- autoload/tagbar.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/tagbar.vim b/autoload/tagbar.vim index 6feead7..6063e91 100644 --- a/autoload/tagbar.vim +++ b/autoload/tagbar.vim @@ -28,6 +28,11 @@ if exists(':Tagbar') == 0 runtime plugin/tagbar.vim endif +if exists(':Tagbar') == 0 + echomsg 'Tagbar: Could not load plugin code, check your runtimepath!' + finish +endif + " Basic init {{{2 redir => s:ftype_out