summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibVT/Terminal.h
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-06-05 09:29:49 +0200
committerAndreas Kling <kling@serenityos.org>2021-06-10 17:18:02 +0200
commit8f8fd9c5a8acf25db12f5f74b4c3802c926b97aa (patch)
tree3d1924a294801eee55ad424c31ebff1959357f38 /Userland/Libraries/LibVT/Terminal.h
parent221ba1aac89f9472bd8b50310f36a832efcba76b (diff)
downloadserenity-8f8fd9c5a8acf25db12f5f74b4c3802c926b97aa.zip
LibVT+Kernel: Support clearing the scrollback buffer
As per the `xterm ctlseqs` documentation, `\e3J` should clear the scrollback buffer, and leave the visible lines unchanged. This commit fixes a FIXME.
Diffstat (limited to 'Userland/Libraries/LibVT/Terminal.h')
-rw-r--r--Userland/Libraries/LibVT/Terminal.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Userland/Libraries/LibVT/Terminal.h b/Userland/Libraries/LibVT/Terminal.h
index 5b34a960a2..8a52aa81ce 100644
--- a/Userland/Libraries/LibVT/Terminal.h
+++ b/Userland/Libraries/LibVT/Terminal.h
@@ -74,12 +74,18 @@ public:
void set_cursor(unsigned row, unsigned column, bool skip_debug = false);
+ void clear_including_history()
+ {
+ clear_history();
+ clear();
+ }
+
#ifndef KERNEL
void clear();
- void clear_including_history();
+ void clear_history();
#else
virtual void clear() = 0;
- virtual void clear_including_history() = 0;
+ virtual void clear_history() = 0;
#endif
#ifndef KERNEL