From 9eec18e76bb42b152b53ef0e23eb64f01e153b8a Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 31 May 2021 11:52:58 -0400 Subject: [PATCH] Guard against unloaded plugin in runtime files This can happen if g:loaded_fugitive is set to disable the plugin, or in a botched install. --- ftplugin/fugitiveblame.vim | 2 +- syntax/fugitiveblame.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ftplugin/fugitiveblame.vim b/ftplugin/fugitiveblame.vim index 6fe0a14..1037b09 100644 --- a/ftplugin/fugitiveblame.vim +++ b/ftplugin/fugitiveblame.vim @@ -1,4 +1,4 @@ -if exists("b:did_ftplugin") || !exists('*fugitive#BlameFileType') +if exists("b:did_ftplugin") || !exists("*FugitiveGitDir") finish endif let b:did_ftplugin = 1 diff --git a/syntax/fugitiveblame.vim b/syntax/fugitiveblame.vim index c06d19e..70c1e74 100644 --- a/syntax/fugitiveblame.vim +++ b/syntax/fugitiveblame.vim @@ -1,4 +1,4 @@ -if exists("b:current_syntax") +if exists("b:current_syntax") || !exists("*FugitiveGitDir") finish endif