Allow calling findresource with custom path

This commit is contained in:
Tim Pope 2014-01-08 20:05:46 -05:00
parent 0fdde20654
commit 18d60a3fa5

View File

@ -370,12 +370,12 @@ function! fireplace#local_client(...) abort
throw ':Connect to a REPL or install classpath.vim to evaluate code' throw ':Connect to a REPL or install classpath.vim to evaluate code'
endfunction endfunction
function! fireplace#findresource(resource) abort function! fireplace#findresource(resource, ...) abort
if a:resource ==# '' if a:resource ==# ''
return '' return ''
endif endif
try try
let path = fireplace#local_client().path() let path = a:0 ? a:1 : fireplace#local_client().path()
catch /^:Connect/ catch /^:Connect/
return '' return ''
endtry endtry