1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:17:45 +00:00

Terminal+LibVT: Add "clear including history" action (Ctrl+Shift+K) :^)

Sometimes you just want to get rid of all your scrollback history in
the terminal, and now there's a way to do that.
This commit is contained in:
Andreas Kling 2020-07-05 23:34:02 +02:00
parent e8a59ef842
commit 0c4b0c0312
5 changed files with 27 additions and 0 deletions

View file

@ -49,6 +49,14 @@ void Terminal::clear()
set_cursor(0, 0);
}
void Terminal::clear_including_history()
{
m_history.clear();
clear();
m_client.terminal_history_changed();
}
inline bool is_valid_parameter_character(u8 ch)
{
return ch >= 0x30 && ch <= 0x3f;