branch: elpa/magit
commit 8c4a903886ba5564afb984aa6629258505990db9
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
magit-dired-jump: Support magit-repolist-mode
Closes #5416.
---
lisp/magit-dired.el | 4 +++-
lisp/magit-repos.el | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lisp/magit-dired.el b/lisp/magit-dired.el
index 087499b4c53..986102562f7 100644
--- a/lisp/magit-dired.el
+++ b/lisp/magit-dired.el
@@ -40,7 +40,9 @@ With a prefix argument, visit in another window. If there
is no file at point, then instead visit `default-directory'."
(interactive "P")
(dired-jump other-window
- (and-let* ((file (magit-file-at-point)))
+ (and-let* ((file (if (derived-mode-p 'magit-repolist-mode)
+ (tabulated-list-get-id)
+ (magit-file-at-point))))
(expand-file-name (if (file-directory-p file)
(file-name-as-directory file)
file)))))
diff --git a/lisp/magit-repos.el b/lisp/magit-repos.el
index 87a4422797d..dcf6808ec14 100644
--- a/lisp/magit-repos.el
+++ b/lisp/magit-repos.el
@@ -31,6 +31,7 @@
(require 'magit-core)
(declare-function magit-status-setup-buffer "magit-status" (&optional
directory))
+(declare-function magit-dired-jump "magit-dired" (&optional other-window))
(defvar x-stretch-cursor)
@@ -262,7 +263,8 @@ If it contains \"%s\" then the directory is substituted for
that."
"m" #'magit-repolist-mark
"u" #'magit-repolist-unmark
"f" #'magit-repolist-fetch
- "5" #'magit-repolist-find-file-other-frame)
+ "5" #'magit-repolist-find-file-other-frame
+ "<remap> <dired-jump>" #'magit-dired-jump)
(define-derived-mode magit-repolist-mode tabulated-list-mode "Repos"
"Major mode for browsing a list of Git repositories."