Automatically open location list on exception

Closes #39.
This commit is contained in:
Tim Pope 2013-01-23 21:25:39 -05:00
parent cd54b73e88
commit 7ff2191a30

View File

@ -427,12 +427,14 @@ endfunction
function! foreplay#eval(expr) abort
let response = s:eval(a:expr, {'session': 1})
call s:output_response(response)
if !empty(get(response, 'stacktrace', []))
call setloclist(0, foreplay#quickfix_for(response.stacktrace))
lopen
wincmd p
endif
call s:output_response(response)
if get(response, 'ex', '') !=# ''
let err = 'Clojure: '.response.ex
elseif has_key(response, 'value')