Skip to content

Conversation

@algj
Copy link

@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
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.

1 participant