File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -649,11 +649,15 @@ not found."
649
649
(file (cadr (assoc " file" info))))
650
650
(cider-find-file file)))
651
651
652
- (defun cider-jump-to (buffer &optional pos )
652
+ (defun cider-jump-to (buffer &optional pos other-buffer )
653
653
" Push current point onto marker ring, and jump to BUFFER to position POS.
654
654
POS can be either a cons cell (LINE . COLUMN) or a number representing the
655
- character position in a buffer. "
655
+ character position in a buffer. If OTHER-BUFFER is non-nil use
656
+ `pop-to-buffer' to jump to the location, otherwise `switch-to-buffer' ."
656
657
(ring-insert find-tag-marker-ring (point-marker ))
658
+ (if other-buffer
659
+ (pop-to-buffer buffer)
660
+ (switch-to-buffer buffer))
657
661
(with-current-buffer buffer
658
662
(widen )
659
663
; ; check if we have a (line . column) pair or just a buffer position
@@ -664,8 +668,7 @@ character position in a buffer. "
664
668
(if (cdr pos)
665
669
(move-to-column (cdr pos))
666
670
(back-to-indentation )))
667
- (cider-mode +1 ))
668
- (switch-to-buffer buffer))
671
+ (cider-mode +1 )))
669
672
670
673
(defun cider-jump-to-resource (path &optional line )
671
674
" Jump to the resource at the relative PATH, optionally at a specific LINE.
You can’t perform that action at this time.
0 commit comments