;;; -*- lexical-binding: t; -*-

(require 'syd/base)

(setq
 ;; In modes making use of `recenter-top-bottom' (e.g. Comint,
 ;; Eshell), this will make the command behave more like a plain old
 ;; `clear` invocation.
 recenter-positions '(top)
 ;; Don't recenter the view after a jump unless >10 lines are scrolled
 ;; off-screen in a single movement.
 scroll-conservatively 10)

;; Smooth scrolling: scroll the view pixel-by-pixel instead of line-by-line.
(use-package ultra-scroll
  :init
  (setq scroll-margin 0) ; important: scroll-margin>0 not yet supported
  :hook (on-init-ui . ultra-scroll-mode))

(provide 'syd/scrolling)
