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
1 changed files with 2 additions and 2 deletions

View File

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