From dad9c8d98b8f7b4676d01d0a67c672a7552c10cc Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Feb 2017 00:52:45 -0500 Subject: [PATCH] core-popups: recenter after following help links --- core/core-popups.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/core-popups.el b/core/core-popups.el index 04d568dae..8b24f267b 100644 --- a/core/core-popups.el +++ b/core/core-popups.el @@ -260,7 +260,9 @@ the command buffer." (doom/popup-close) (switch-to-buffer (car location) nil t) (if (cdr location) - (goto-char (cdr location)) + (progn + (goto-char (cdr location)) + (recenter)) (message "Unable to find location in file"))))) (define-button-type 'help-variable-def @@ -272,7 +274,9 @@ the command buffer." (doom/popup-close) (switch-to-buffer (car location) nil t) (if (cdr location) - (goto-char (cdr location)) + (progn + (goto-char (cdr location)) + (recenter)) (message "Unable to find location in file"))))) (define-button-type 'help-face-def @@ -284,7 +288,9 @@ the command buffer." (doom/popup-close) (switch-to-buffer (car location) nil t) (if (cdr location) - (goto-char (cdr location)) + (progn + (goto-char (cdr location)) + (recenter)) (message "Unable to find location in file"))))))