fix(magit): remap magit-browse-thing to forge-browse-*

When using evil +everywhere, we disable the default forge bindings.
We must then explicitly remap magit-browse-thing, as it's just a
placeholder command (bound in multiple places).
This commit is contained in:
Samuel Tschiedel 2022-09-16 13:35:12 -03:00 committed by Henrik Lissner
parent e2608cbdd5
commit 9b73ce3ad8

View file

@ -156,6 +156,10 @@ Only has an effect in GUI Emacs.")
:config
;; All forge list modes are derived from `forge-topic-list-mode'
(map! :map forge-topic-list-mode-map :n "q" #'kill-current-buffer)
(when (not forge-add-default-bindings)
(map! :map magit-mode-map [remap magit-browse-thing] #'forge-browse-dwim
:map magit-remote-section-map [remap magit-browse-thing] #'forge-browse-remote
:map magit-branch-section-map [remap magit-browse-thing] #'forge-browse-branch))
(set-popup-rule! "^\\*?[0-9]+:\\(?:new-\\|[0-9]+$\\)" :size 0.45 :modeline t :ttl 0 :quit nil)
(set-popup-rule! "^\\*\\(?:[^/]+/[^ ]+ #[0-9]+\\*$\\|Issues\\|Pull-Requests\\|forge\\)" :ignore t)