Fewer explosions when gf goes wrong
This commit is contained in:
parent
286a1f6c47
commit
879443c846
@ -802,11 +802,12 @@ function! foreplay#findfile(path) abort
|
|||||||
let path .= '.clj'
|
let path .= '.clj'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
let result = get(split(s:eval(printf(cmd, '"'.escape(path, '"').'"'), options).value, "\n"), 0, '')
|
let response = s:eval(printf(cmd, '"'.escape(path, '"').'"'), options)
|
||||||
|
let result = get(split(get(response, 'value', ''), "\n"), 0, '')
|
||||||
|
|
||||||
endif
|
endif
|
||||||
if result ==# ''
|
if result ==# ''
|
||||||
return findfile(path, &l:path)
|
return foreplay#findresource(path)
|
||||||
else
|
else
|
||||||
return result
|
return result
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user