Fix eval with trailing comment in nREPL adapter

This commit is contained in:
Raymond W. Ko 2013-01-08 22:38:50 -05:00 committed by Tim Pope
parent 058da0d71c
commit c7f2a2ab6b

View File

@ -146,7 +146,7 @@ endfunction
function! s:nrepl_eval(expr, ...) dict abort function! s:nrepl_eval(expr, ...) dict abort
let payload = {"op": "eval"} let payload = {"op": "eval"}
let payload.code = '(try (eval ''(do '.a:expr.')) (catch Exception e (print (apply str (interpose "\t" (map str (.getStackTrace e))))) (throw e)))' let payload.code = '(try (eval ''(do '.a:expr."\n".')) (catch Exception e (print (apply str (interpose "\t" (map str (.getStackTrace e))))) (throw e)))'
let options = a:0 ? a:1 : {} let options = a:0 ? a:1 : {}
if has_key(options, 'ns') if has_key(options, 'ns')
let payload.ns = options.ns let payload.ns = options.ns