aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/term.rs')
-rw-r--r--src/term.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/term.rs b/src/term.rs
index 170e2ca..cb5488a 100644
--- a/src/term.rs
+++ b/src/term.rs
@@ -14,6 +14,15 @@ impl BufWrite for ClearScreen {
}
#[derive(Default, Debug)]
+pub struct ClearRowForward;
+
+impl BufWrite for ClearRowForward {
+ fn write_buf(&self, buf: &mut Vec<u8>) {
+ buf.extend_from_slice(b"\x1b[K");
+ }
+}
+
+#[derive(Default, Debug)]
pub struct CRLF;
impl BufWrite for CRLF {
@@ -253,6 +262,12 @@ pub struct EraseChar {
count: u16,
}
+impl EraseChar {
+ pub fn new(count: u16) -> Self {
+ Self { count }
+ }
+}
+
impl Default for EraseChar {
fn default() -> Self {
Self { count: 1 }