mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
Don't assume term-current-row cache is valid (Bug#31193)
* lisp/term.el (term-down): Call `term-current-row' instead of directly accessing the variable `term-current-row. Following a resize of the terminal's window, `term-current-row' is reset to nil, so it is not safe to assume it is a number.
This commit is contained in:
parent
326a296fed
commit
b89ff0efdb
@ -3764,7 +3764,7 @@ all pending output has been dealt with."))
|
||||
(let ((start-column (term-horizontal-column)))
|
||||
(when (and check-for-scroll (or term-scroll-with-delete term-pager-count))
|
||||
(setq down (term-handle-scroll down)))
|
||||
(unless (and (= term-current-row 0) (< down 0))
|
||||
(unless (and (= (term-current-row) 0) (< down 0))
|
||||
(term-adjust-current-row-cache down)
|
||||
(when (or (/= (point) (point-max)) (< down 0))
|
||||
(setq down (- down (term-vertical-motion down)))))
|
||||
@ -3774,7 +3774,7 @@ all pending output has been dealt with."))
|
||||
(setq term-current-column 0)
|
||||
(setq term-start-line-column 0))
|
||||
(t
|
||||
(when (= term-current-row 0)
|
||||
(when (= (term-current-row) 0)
|
||||
;; Insert lines if at the beginning.
|
||||
(save-excursion (term-insert-char ?\n (- down)))
|
||||
(save-excursion
|
||||
|
Loading…
Reference in New Issue
Block a user