Differences From
Artifact [7633d1775c]:
41 41 :type '(repeat (list (string :tag "Board Domain")
42 42 (repeat (string :tag "Board Name"))
43 43 (boolean :tag "Use TLS?"))))
44 44
45 45 (defcustom sbbs-jump-to-link t
46 46 "Jump to first link after narrowing posts."
47 47 :type 'boolean)
48 +
49 +(defcustom sbbs-recenter-to-top t
50 + "Move point to top of frame when moving through posts."
51 + :type 'boolean)
48 52
49 53 (defface sbbs--spoiler-face
50 54 '((((background light)) :background "black" :foreground "black")
51 55 (((background dark)) :background "white" :foreground "white"))
52 56 "Face for spoiler text in threads.")
53 57
54 58 (defface sbbs--code-face
................................................................................
476 480 (dotimes (_ arg)
477 481 (end-of-line)
478 482 (catch 'found
479 483 (while (search-forward-regexp "^#" nil t)
480 484 (when (and (eq 'highlight (get-text-property (point) 'face))
481 485 (not (get-text-property (point) 'invisible)))
482 486 (throw 'found t)))))
483 - (beginning-of-line))
487 + (beginning-of-line)
488 + (when sbbs-recenter-to-top
489 + (set-window-start (selected-window) (point))))
484 490
485 491 (defun sbbs-read-previous (arg)
486 492 "Move point ARG posts backwards."
487 493 (interactive "p")
488 494 (dotimes (_ arg)
489 495 (catch 'found
490 496 (while (search-backward-regexp "^#" nil t)
491 497 (when (and (eq 'highlight (get-text-property (point) 'face))
492 498 (not (get-text-property (point) 'invisible)))
493 499 (throw 'found t)))))
494 - (beginning-of-line))
500 + (beginning-of-line)
501 + (when sbbs-recenter-to-top
502 + (set-window-start (selected-window) (point))))
495 503
496 504 ;;;###autoload
497 505 (defun sbbs-browse (board reload)
498 506 "Open thread overview for BOARD."
499 507 (interactive (list (sbbs-read-board) nil))
500 508 (let* ((name (format "*browsing /%s/*" (sbbs--board-name board)))
501 509 (url (sbbs--board-url "list" t board)))