1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00
alacritty/src/grid
Christian Duerr 8e8ecdd0f9
Scroll visible area when growing window
Since Alacritty never had any scrollback history, the behavior when the
window height was increased was to just keep the prompt on the same line
it has been before the resize. However the usual behavior of terminal
emulators is to keep the distance from the prompt to the bottom of the
screen consistent whenever possible.

This fixes this behavior by loading lines from the scrollback buffer
when the window height is increased. This is only done when scrollback
is available, so there are only N lines available, the maximum amount of
lines which will be loaded when growing the height is N. Since the
number of lines available in the alternate screen buffer is 0, it still
behaves the same way it did before this patch.

Different terminal emulators have different behaviors when this is done
in the alt screen buffer, XTerm for example loads history from the
normal screen buffer when growing the height of the window from the
alternate screen buffer. Since this seems wrong (the alt screen is not
supposed to have any scrollback), the behavior of Termite (VTE) has been
chosen instead.

In Termite the alt screen buffer never loads any scrollback history
itself, however when the terminal height is grown while the alternate
screen is active, the normal screen's scrollback history lines are
loaded.

This fixes #1502.
2018-08-15 20:09:59 +00:00
..
mod.rs Scroll visible area when growing window 2018-08-15 20:09:59 +00:00
row.rs Scrollback cleanup 2018-07-21 17:17:41 +00:00
storage.rs Replace runtime debug assertions with static asserts on scrollback 2018-07-26 15:47:14 +00:00
tests.rs Scrollback cleanup 2018-07-21 17:17:41 +00:00