Last active
April 20, 2016 21:56
-
-
Save danielbraun/6614941115cdac623b68d805a66eb798 to your computer and use it in GitHub Desktop.
vim fireplace cfix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/autoload/fireplace/nrepl.vim b/autoload/fireplace/nrepl.vim | |
index 5d081e7..15367e0 100644 | |
--- a/autoload/fireplace/nrepl.vim | |
+++ b/autoload/fireplace/nrepl.vim | |
@@ -183,8 +183,10 @@ endfunction | |
function! s:extract_last_stacktrace(nrepl, session) abort | |
if a:nrepl.has_op('stacktrace') | |
let stacktrace = filter(a:nrepl.message({'op': 'stacktrace', 'session': a:session}), 'has_key(v:val, "file")') | |
- if !empty(stacktrace) | |
- return map(stacktrace, 'v:val.class.".".v:val.method."(".v:val.file.":".v:val.line.")"') | |
+ let fixed_stacktrace = get(stacktrace[0], "stacktrace") | |
+ if !empty(fixed_stacktrace) | |
+ "return map(fixed_stacktrace, 'v:val.class.".".v:val.method."(".v:val.file.":".v:val.line.")"') | |
+ return map(fixed_stacktrace, 'v:val.class.".".v:val.method."("."some file".":".v:val.line.")"') | |
endif | |
endif | |
let format_st = '(symbol (str "\n\b" (apply str (interleave (repeat "\n") (map str (.getStackTrace *e)))) "\n\b\n"))' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment