Only activate Projectionist if config file exists

References https://github.com/tpope/vim-projectionist/issues/130
This commit is contained in:
Tim Pope 2019-06-03 00:31:46 -04:00
parent 8bbc4d8816
commit a135d10967

View File

@ -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