Fewer explosions when gf goes wrong

This commit is contained in:
Tim Pope 2013-01-13 10:28:25 -05:00
parent 286a1f6c47
commit 879443c846

View File

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