mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
core-popups: recenter after following help links
This commit is contained in:
@ -260,7 +260,9 @@ the command buffer."
|
|||||||
(doom/popup-close)
|
(doom/popup-close)
|
||||||
(switch-to-buffer (car location) nil t)
|
(switch-to-buffer (car location) nil t)
|
||||||
(if (cdr location)
|
(if (cdr location)
|
||||||
|
(progn
|
||||||
(goto-char (cdr location))
|
(goto-char (cdr location))
|
||||||
|
(recenter))
|
||||||
(message "Unable to find location in file")))))
|
(message "Unable to find location in file")))))
|
||||||
|
|
||||||
(define-button-type 'help-variable-def
|
(define-button-type 'help-variable-def
|
||||||
@ -272,7 +274,9 @@ the command buffer."
|
|||||||
(doom/popup-close)
|
(doom/popup-close)
|
||||||
(switch-to-buffer (car location) nil t)
|
(switch-to-buffer (car location) nil t)
|
||||||
(if (cdr location)
|
(if (cdr location)
|
||||||
|
(progn
|
||||||
(goto-char (cdr location))
|
(goto-char (cdr location))
|
||||||
|
(recenter))
|
||||||
(message "Unable to find location in file")))))
|
(message "Unable to find location in file")))))
|
||||||
|
|
||||||
(define-button-type 'help-face-def
|
(define-button-type 'help-face-def
|
||||||
@ -284,7 +288,9 @@ the command buffer."
|
|||||||
(doom/popup-close)
|
(doom/popup-close)
|
||||||
(switch-to-buffer (car location) nil t)
|
(switch-to-buffer (car location) nil t)
|
||||||
(if (cdr location)
|
(if (cdr location)
|
||||||
|
(progn
|
||||||
(goto-char (cdr location))
|
(goto-char (cdr location))
|
||||||
|
(recenter))
|
||||||
(message "Unable to find location in file"))))))
|
(message "Unable to find location in file"))))))
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user