From a135d1096740e6a4c133be195fd14948128e8d77 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 3 Jun 2019 00:31:46 -0400 Subject: [PATCH] Only activate Projectionist if config file exists References https://github.com/tpope/vim-projectionist/issues/130 --- plugin/fugitive.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 94f47bc..b1af3ac 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -232,7 +232,10 @@ function! s:ProjectionistDetect() abort if exists('+shellslash') && !&shellslash let base = tr(base, '/', '\') endif - call projectionist#append(base, FugitiveCommonDir(dir) . '/info/projections.json') + let file = FugitiveCommonDir(dir) . '/info/projections.json' + if filereadable(file) + call projectionist#append(base, file) + endif endif endfunction