mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Fix followed org links not recentering correctly
Links like `file:test.cpp::45` would open file.cpp, but end up somewhere else than line 45. Same with links like `file:test.cpp::int main()`.
This commit is contained in:
@ -347,6 +347,12 @@ between the two."
|
||||
;; Don't open separate windows
|
||||
(setf (alist-get 'file org-link-frame-setup) #'find-file)
|
||||
|
||||
(defun +org|delayed-recenter ()
|
||||
"`recenter', but after a tiny delay. Necessary to prevent certain race
|
||||
conditions where a window's buffer hasn't changed at the time this hook is run."
|
||||
(run-at-time 0.1 nil #'recenter))
|
||||
(add-hook 'org-follow-link-hook #'+org|delayed-recenter)
|
||||
|
||||
;; Fix variable height org-level-N faces in the eldoc string
|
||||
(defun +org*fix-font-size-variation-in-eldoc (orig-fn)
|
||||
(cl-letf (((symbol-function 'org-format-outline-path)
|
||||
|
Reference in New Issue
Block a user