summaryrefslogtreecommitdiffstats
path: root/lisp/init-git.el
diff options
context:
space:
mode:
authorMartin Polden <mpolden@mpolden.no>2020-02-06 21:21:24 +0100
committerMartin Polden <mpolden@mpolden.no>2020-02-06 21:21:24 +0100
commit50d9a7e38ee57a4572bd918be2536497b5294561 (patch)
treec33e76a4bea26a9001270b30f3a7e729a5171ad9 /lisp/init-git.el
parentc1e326579e0e3dd1fafde5480f141d557d8202b4 (diff)
Fix C-o in magit-status
Diffstat (limited to 'lisp/init-git.el')
-rw-r--r--lisp/init-git.el17
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index bd4d594..a022f5e 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -12,21 +12,18 @@
;; use gfm-mode as major mode
(setq git-commit-major-mode 'gfm-mode))
-;; magit config
-(defun magit-diff-visit-file-other-window (&optional noselect)
+(defun magit-visit-file-other-window (&optional noselect)
"Visit current file in another window."
(interactive)
- (let ((current-window (selected-window))
- ;; magit-diff-visit-file visits in other-window with prefix arg
- (current-prefix-arg '(t)))
- (call-interactively 'magit-diff-visit-file)
+ (let ((current-window (selected-window)))
+ (call-interactively 'magit-diff-visit-file-other-window)
(when noselect
(select-window current-window))))
-(defun magit-diff-visit-file-other-window-noselect ()
+(defun magit-visit-file-other-window-noselect ()
"Visit current file in another window, but don't select it."
(interactive)
- (magit-diff-visit-file-other-window t))
+ (magit-visit-file-other-window t))
(use-package magit
:init
@@ -40,8 +37,8 @@
("C-c b" . magit-blame)
:map magit-status-mode-map
;; make C-o and o behave as in dired
- ("o" . magit-diff-visit-file-other-window)
- ("C-o" . magit-diff-visit-file-other-window-noselect)))
+ ("o" . magit-visit-file-other-window)
+ ("C-o" . magit-visit-file-other-window-noselect)))
;; follow symlinks to files under version control
(setq vc-follow-symlinks t)