diff options
author | Nathan Lilienthal <nathan@nixpulvis.com> | 2018-09-01 20:30:03 -0400 |
---|---|---|
committer | Christian Duerr <chrisduerr@users.noreply.github.com> | 2018-09-02 00:30:03 +0000 |
commit | 72495172c25e00799f29eb2e79fe40ddfa189866 (patch) | |
tree | 996394ed5bef5318aaf202db98076f0455b02734 /alacritty_macos.yml | |
parent | 8e8ecdd0f98dd8005cd940d19dc0a922661d64fc (diff) | |
download | alacritty-72495172c25e00799f29eb2e79fe40ddfa189866.tar.gz alacritty-72495172c25e00799f29eb2e79fe40ddfa189866.zip |
Implement `ansi::ClearMode::Saved`
The clearing the screen for the `ansi::ClearMode::Saved` enum value
has been implemented. This is used to clear all lines which are
currently outside of the visible region but still inside the scrollback
buffer.
The specifications of XTerm indicate that the clearing of saved lines
should only clear the saved lines and not the saved lines plus the
currently visible part of the grid. Applications like `clear` send both
the escape for clearing history plus the escape for clearing history
when requested, so all sources seem to agree here.
To allow both clearing the screen and the saved lines when a key is
pressed the `process_key_bindings` method has been altered so multiple
bindings can be specified. So it is now possible to execute both `^L`
and `ClearHistory` with just a single binding. The
`process_mouse_bindings` method has also been changed for consistency.
To make sure everything works properly a test has been added which
clears the history and then attempts to scroll. Since scrolling is the
only way for a user to check if scrollback is available, this seems like
a nice abstraction to check if there is a scrollback.
Diffstat (limited to 'alacritty_macos.yml')
-rw-r--r-- | alacritty_macos.yml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/alacritty_macos.yml b/alacritty_macos.yml index 663647dc..05173e6a 100644 --- a/alacritty_macos.yml +++ b/alacritty_macos.yml @@ -315,6 +315,8 @@ key_bindings: - { key: Key0, mods: Command, action: ResetFontSize } - { key: Equals, mods: Command, action: IncreaseFontSize } - { key: Minus, mods: Command, action: DecreaseFontSize } + - { key: K, mods: Command, action: ClearHistory } + - { key: K, mods: Command, chars: "\x0c" } - { key: PageUp, mods: Shift, chars: "\x1b[5;2~" } - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } - { key: PageUp, chars: "\x1b[5~" } |