tools/magit: reveal point if in invisible region
When visiting a file from magit. Fix #4895
This commit is contained in:
parent
86fd6c6214
commit
3e425ab2f2
1 changed files with 9 additions and 1 deletions
|
@ -113,7 +113,15 @@ For example, diffs and log buffers. Accepts `left', `right', `up', and `down'.")
|
|||
(add-hook! 'magit-status-mode-hook
|
||||
(defun +magit-optimize-process-calls-h ()
|
||||
(when-let (path (executable-find magit-git-executable t))
|
||||
(setq-local magit-git-executable path)))))
|
||||
(setq-local magit-git-executable path))))
|
||||
|
||||
(add-hook! 'magit-diff-visit-file-hook
|
||||
(defun +magit-reveal-point-if-invisible-h ()
|
||||
"Reveal the point if in an invisible region."
|
||||
(if (derived-mode-p 'org-mode)
|
||||
(org-reveal '(4))
|
||||
(require 'reveal)
|
||||
(reveal-post-command)))))
|
||||
|
||||
|
||||
(use-package! forge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue