diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 18:47:27 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 18:47:27 -0400 |
commit | 962547791e6ea16b18512e6b933a5317c464da26 (patch) | |
tree | 87fc820012905ecdca864ec3722c222a82e331d9 /lisp/term.el | |
parent | eaeb69c59c3df6d33a865356973018b24265d120 (diff) | |
parent | 8a1576cc03963138d62c42bd373226e58f9f17c6 (diff) | |
download | emacs-962547791e6ea16b18512e6b933a5317c464da26.tar.gz |
Merge from emacs-26
8a1576cc03 Fix term.el cursor movement at bottom margin (Bug#31690)
Diffstat (limited to 'lisp/term.el')
-rw-r--r-- | lisp/term.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/term.el b/lisp/term.el index 9aa4a20e36e..121a22e7933 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3306,11 +3306,9 @@ option is enabled. See `term-set-goto-process-mark'." ((eq char ?B) (let ((tcr (term-current-row)) (scroll-amount (car params))) - (unless (= tcr (1- term-scroll-end)) + (unless (>= tcr term-scroll-end) (term-down - (if (> (+ tcr scroll-amount) term-scroll-end) - (- term-scroll-end 1 tcr) - (max 1 scroll-amount)) + (min (- term-scroll-end tcr) (max 1 scroll-amount)) t)))) ;; \E[C - cursor right (terminfo: cuf, cuf1) ((eq char ?C) |