Skip to content

Clear output action#2232

Open
algj wants to merge 1 commit into
gnunn1:masterfrom
algj:clear-action
Open

Clear output action#2232
algj wants to merge 1 commit into
gnunn1:masterfrom
algj:clear-action

Conversation

@algj
Copy link
Copy Markdown

@algj algj commented Jul 28, 2024

Clear text while leaving current line intact, keeping selection and clearing scrollback buffer. Appears in shortcut list in Terminal -> Clear output and right-click menu as Clear.

Note: while this is a hacky method, it reproduces same "Clear" that vscode does, especially with TUI's. I unfortunately had trouble extracting current line with vte.getText and vte.getTextRange, which lead me to this solution that does not require patching VTE.

Before clean:
image
After clean (can't scroll up):
image

#2217 #1615 🎉

Clear text while leaving current line intact, keeping selection and clearing scrollback buffer. Appears in shortcut list in `Terminal -> Clear output` and right-click menu as `Clear`.

Update terminal.d
@dejlek
Copy link
Copy Markdown

dejlek commented Jan 19, 2026

Isn't this what CTRL-L does in VTE?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants