Skip to content

Commit

Permalink
magit-dired-jump: expand filename before passing to dired-jump
Browse files Browse the repository at this point in the history
Fixes #1996.
  • Loading branch information
tarsius committed Jul 7, 2015
1 parent dccd322 commit 54ca250
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lisp/magit.el
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,8 @@ is done using `magit-find-index-noselect'."
With a prefix argument, visit in other window. If there
is no file at point then instead visit `default-directory'."
(interactive "P")
(dired-jump other-window (or (magit-file-at-point) default-directory)))
(dired-jump other-window (or (expand-file-name (magit-file-at-point))

This comment has been minimized.

Copy link
@swsnr

swsnr Jul 7, 2015

Contributor

Won't that signal an error if (magit-file-at-point) returns nil? expand-file-name doesn't handle nil, does it?

This comment has been minimized.

Copy link
@tarsius

tarsius Jul 7, 2015

Author Member

Indeed, thanks for noticing. I have pushed a fix.

default-directory)))

;;; Manipulate
;;;; Init
Expand Down

0 comments on commit 54ca250

Please sign in to comment.