Never throw exception in fireplace#op_available

This commit is contained in:
Tim Pope 2014-04-12 21:49:45 -04:00
parent c6e0d55143
commit 5f1cee19c0
1 changed files with 7 additions and 4 deletions

View File

@ -556,10 +556,13 @@ function! fireplace#message(payload, ...) abort
endfunction
function! fireplace#op_available(op) abort
let client = fireplace#platform()
if has_key(client, 'connection')
return client.connection.has_op(a:op)
endif
try
let client = fireplace#platform()
if has_key(client, 'connection')
return client.connection.has_op(a:op)
endif
catch /^Fireplace: :Connect to a REPL/
endtry
endfunction
function! fireplace#findresource(resource, ...) abort