diff options
author | John Shahid <jvshahid@gmail.com> | 2019-04-29 13:53:38 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-05-07 14:51:42 -0400 |
commit | e44b56d16ad0749e599700a73509c16391ed973e (patch) | |
tree | 30fa77764767cdd4a954d94383c703db0f1dac9d /lisp/emacs-lisp/syntax.el | |
parent | 32cf07819ae8cfdbf14e00f351c7f520fff325c3 (diff) | |
download | emacs-e44b56d16ad0749e599700a73509c16391ed973e.tar.gz emacs-e44b56d16ad0749e599700a73509c16391ed973e.tar.bz2 emacs-e44b56d16ad0749e599700a73509c16391ed973e.zip |
Fix setting and resetting of scroll-with-delete
The start and end lines of the scroll region must to be in the range
[0,term-height). There are few placees that incorrectly set the end
line of the scroll region to term-height which is outside the valid
range. Combined with another off-by-one error in
term-set-scroll-region's clamping logic, this would cause
term-scroll-with-delete to be unnecessarily turned on.
* lisp/term.el (term-scroll-start,term-scroll-end): Use defvar-local
to define the variables and document the valid range of values that
the variables can take.
(term--last-line): New function to calculate the 0-based index of the
last line.
(term--reset-scroll-region): New function to reset the scroll region
to the full height of the terminal.
(term-mode,term-reset-size,term-reset-terminal): Call
term--reset-scroll-region to reset the scroll region.
(term-set-scroll-region): Fix the off-by-one error in the clamping
logic which allowed term-scroll-end to have values outside the valid
range [0,term-height).
Diffstat (limited to 'lisp/emacs-lisp/syntax.el')
0 files changed, 0 insertions, 0 deletions