[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 b89ff0e: Don't assume term-current-row cache is v
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] emacs-26 b89ff0e: Don't assume term-current-row cache is valid (Bug#31193) |
Date: |
Wed, 18 Apr 2018 08:04:07 -0400 (EDT) |
branch: emacs-26
commit b89ff0efdb65e9febe4c3ed2586a48a2b42233aa
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
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.
---
lisp/term.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/term.el b/lisp/term.el
index 0a5efa4..6860ea6 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 b89ff0e: Don't assume term-current-row cache is valid (Bug#31193),
Noam Postavsky <=