Function: term-set-scroll-region
term-set-scroll-region is a byte-compiled function defined in
term.el.gz.
Signature
(term-set-scroll-region TOP BOTTOM)
Documentation
Set scrolling region.
TOP is the top-most line (inclusive) of the new scrolling region, while BOTTOM is the line following the new scrolling region (e.g. exclusive). The top-most line is line 0.
Source Code
;; Defined in /usr/src/emacs/lisp/term.el.gz
(defun term-set-scroll-region (top bottom)
"Set scrolling region.
TOP is the top-most line (inclusive) of the new scrolling region,
while BOTTOM is the line following the new scrolling region (e.g. exclusive).
The top-most line is line 0."
(setq term-scroll-start
(if (or (< top 0) (>= top term-height))
0
top))
(setq term-scroll-end
(if (or (<= bottom term-scroll-start) (> bottom (term--last-line)))
(term--last-line)
bottom))
(setq term-scroll-with-delete
(or (term-using-alternate-sub-buffer)
(not (and (= term-scroll-start 0)
(= term-scroll-end (term--last-line))))))
(term-move-columns (- (term-current-column)))
(term-goto 0 0))