commit a135d1096740e6a4c133be195fd14948128e8d77 (tree) parent 8bbc4d8816581d57b33364b11115cf64210c69ca Author: Tim Pope <code@tpope.net> Date: Mon, 3 Jun 2019 00:31:46 -0400 Only activate Projectionist if config file exists References https://github.com/tpope/vim-projectionist/issues/130 Diffstat:
| M | plugin/fugitive.vim | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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