From 879443c846ad07edfad697900e8e4a4c7fdee163 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 13 Jan 2013 10:28:25 -0500 Subject: [PATCH] Fewer explosions when gf goes wrong --- plugin/foreplay.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugin/foreplay.vim b/plugin/foreplay.vim index 347780b..c31e4f8 100644 --- a/plugin/foreplay.vim +++ b/plugin/foreplay.vim @@ -802,11 +802,12 @@ function! foreplay#findfile(path) abort let path .= '.clj' 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 if result ==# '' - return findfile(path, &l:path) + return foreplay#findresource(path) else return result endif