diff options
author | Noam Postavsky <npostavs@gmail.com> | 2018-06-02 15:57:33 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2018-06-10 17:57:50 -0400 |
commit | 8a1576cc03963138d62c42bd373226e58f9f17c6 (patch) | |
tree | 21bc84d9d7a957bf211b3c8f7eed2e7b68ae972e /lisp/term.el | |
parent | 4c3fae3cf26d2112f0744f89da93b2440cd45d56 (diff) | |
download | emacs-8a1576cc03963138d62c42bd373226e58f9f17c6.tar.gz |
Fix term.el cursor movement at bottom margin (Bug#31690)
* lisp/term.el (term-handle-ansi-escape) <\E[B cud>: Allow moving the
cursor to the bottom margin line, rather than stopping one line
before.
Diffstat (limited to 'lisp/term.el')
-rw-r--r-- | lisp/term.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/term.el b/lisp/term.el index 419ddb2db5c..60cd547f93d 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3387,11 +3387,10 @@ option is enabled. See `term-set-goto-process-mark'." ;; \E[B - cursor down (terminfo: cud) ((eq char ?B) (let ((tcr (term-current-row))) - (unless (= tcr (1- term-scroll-end)) + (unless (>= tcr term-scroll-end) (term-down - (if (> (+ tcr term-terminal-parameter) term-scroll-end) - (- term-scroll-end 1 tcr) - (max 1 term-terminal-parameter)) t)))) + (min (- term-scroll-end tcr) (max 1 term-terminal-parameter)) + t)))) ;; \E[C - cursor right (terminfo: cuf, cuf1) ((eq char ?C) (term-move-columns |