Skip to content

Commit

Permalink
Merge pull request #854 from vspinu/stack-nav
Browse files Browse the repository at this point in the history
Fix broken stacktrace navigation to references of the form `foo/eval16959/fn`
  • Loading branch information
bbatsov committed Feb 1, 2015
2 parents 68de950 + 6e8bffa commit d309a99
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cider-stacktrace.el
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,12 @@ it wraps to 0."
(method (button-get button 'method))
(info (or (and var (cider-var-info var))
(and class method (cider-member-info class method))
`(dict "file" ,(button-get button 'file))))
(nrepl-dict)))
;; stacktrace returns more accurate line numbers
(info (nrepl-dict-put info "line" (button-get button 'line))))
(info (nrepl-dict-put info "line" (button-get button 'line)))
;; give priority to `info` files as `info` returns full paths.
(info (nrepl-dict-put info "file" (or (nrepl-dict-get info "file")
(button-get button 'file)))))
(cider--jump-to-loc-from-info info t)))

(defun cider-stacktrace-jump ()
Expand Down
4 changes: 4 additions & 0 deletions nrepl-client.el
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ If so ask the user for confirmation."

;;; nREPL dict

(defun nrepl-dict (&rest key-vals)
"Create nREPL dict from KEY-VALS."
(cons 'dict key-vals))

(defun nrepl-dict-p (object)
"Return t if OBJECT is a nREPL dict."
(and (listp object)
Expand Down

0 comments on commit d309a99

Please sign in to comment.