Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle CSI command J3 (Clear saved lines) #457

Merged
merged 1 commit into from
Mar 4, 2017

Conversation

Aaron1011
Copy link
Contributor

Xterm supports an extension to the CSI command Erase in Display (ED), under the command number 3. This command is used to clear the scrollback buffer - e.g. anything not visible on the screen.

Since scrollback may not be added to alacritty, I've made the handler for this command do nothing. If at some point scrollback is implemented, the corresponding match arm can be modified to properly handle this.

For an example of a program which uses this command, run the clear command (using ncurses 6.0). In a supported terminal such as gnome-terminal, this will clear anything off of the screen from the scrollback buffer. In the current alacritty master, this will generate an Unhandled CSI message.

@jwilm
Copy link
Contributor

jwilm commented Mar 4, 2017

Thanks for the PR, and for the thorough explanation! Would you mind putting that info into the commit message so it's visible in git log and blame?

@Aaron1011
Copy link
Contributor Author

Sure!

Xterm supports an extension to the CSI command `Erase in Display (ED)`,
under the command number 3. This command is used to clear the scrollback
buffer - e.g. anything not visible on the screen.

Since scrollback is not part of alacritty, the handler for this
command currently does nothing. If at some point scrollback is implemented,
the corresponding `match` arm can be modified to properly handle this.

For an example of a program which uses this command, run the `clear`
command (using ncurses 6.0). In a supported terminal such as
`gnome-terminal`, this will clear anything off of the screen from the
scrollback buffer. Before this change, `alacritty` would generate
an `Unhandled CSI` message.
@Aaron1011
Copy link
Contributor Author

@jwilm I've modified the commit message.

@jwilm jwilm merged commit aa76b29 into alacritty:master Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants