diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-12 06:21:51 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-12 06:23:10 -0500 |
commit | b24fe512e41296a7af0c6cff20b6a37fcf720e26 (patch) | |
tree | 46cdfefbc6977356d73c13c000e01baa3187320a /src/term.rs | |
parent | 28eea9f6a837dad5febfe9b021b7070e96b286f9 (diff) | |
download | vt100-rust-b24fe512e41296a7af0c6cff20b6a37fcf720e26.tar.gz vt100-rust-b24fe512e41296a7af0c6cff20b6a37fcf720e26.zip |
make contents_diff include bell state
i don't think it makes sense for contents_formatted to include this
Diffstat (limited to 'src/term.rs')
-rw-r--r-- | src/term.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/term.rs b/src/term.rs index 1e69d07..c988702 100644 --- a/src/term.rs +++ b/src/term.rs @@ -344,3 +344,23 @@ impl BufWrite for MoveFromTo { } } } + +#[derive(Default, Debug)] +#[must_use = "this struct does nothing unless you call write_buf"] +pub struct AudibleBell; + +impl BufWrite for AudibleBell { + fn write_buf(&self, buf: &mut Vec<u8>) { + buf.push(b'\x07'); + } +} + +#[derive(Default, Debug)] +#[must_use = "this struct does nothing unless you call write_buf"] +pub struct VisualBell; + +impl BufWrite for VisualBell { + fn write_buf(&self, buf: &mut Vec<u8>) { + buf.extend_from_slice(b"\x1bg"); + } +} |