aboutsummaryrefslogtreecommitdiff
path: root/sx-question-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-question-mode.el')
-rw-r--r--sx-question-mode.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/sx-question-mode.el b/sx-question-mode.el
index f1a8cc0..06413f2 100644
--- a/sx-question-mode.el
+++ b/sx-question-mode.el
@@ -499,11 +499,12 @@ Prefix argument N moves N sections down or up."
(unless (and (overlayp ov)
(overlay-get ov 'invisible))
(cl-decf count)))))
- (when sx-question-mode-recenter-line
- (let ((ov (car-safe (sx-question-mode--section-overlays-at (line-end-position)))))
- (when (and (overlayp ov) (> (overlay-end ov) (window-end)))
- (recenter sx-question-mode-recenter-line))))
- (sx-message-help-echo))
+ (when (equal (selected-window) (get-buffer-window))
+ (when sx-question-mode-recenter-line
+ (let ((ov (car-safe (sx-question-mode--section-overlays-at (line-end-position)))))
+ (when (and (overlayp ov) (> (overlay-end ov) (window-end)))
+ (recenter sx-question-mode-recenter-line))))
+ (sx-message-help-echo)))
(defun sx-question-mode-previous-section (&optional n)
"Move down to previous section (question or answer) of this buffer.