@@ -44,8 +44,12 @@ (defcustom sbbs-jump-to-link t "Jump to first link after narrowing posts." :type 'boolean) + +(defcustom sbbs-recenter-to-top t + "Move point to top of frame when moving through posts." + :type 'boolean) (defface sbbs--spoiler-face '((((background light)) :background "black" :foreground "black") (((background dark)) :background "white" :foreground "white")) @@ -479,9 +483,11 @@ (while (search-forward-regexp "^#" nil t) (when (and (eq 'highlight (get-text-property (point) 'face)) (not (get-text-property (point) 'invisible))) (throw 'found t))))) - (beginning-of-line)) + (beginning-of-line) + (when sbbs-recenter-to-top + (set-window-start (selected-window) (point)))) (defun sbbs-read-previous (arg) "Move point ARG posts backwards." (interactive "p") @@ -490,9 +496,11 @@ (while (search-backward-regexp "^#" nil t) (when (and (eq 'highlight (get-text-property (point) 'face)) (not (get-text-property (point) 'invisible))) (throw 'found t))))) - (beginning-of-line)) + (beginning-of-line) + (when sbbs-recenter-to-top + (set-window-start (selected-window) (point)))) ;;;###autoload (defun sbbs-browse (board reload) "Open thread overview for BOARD."