diff options
author | Jesse Luehrs <doy@tozt.net> | 2022-03-05 13:36:41 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2022-03-05 13:36:41 -0500 |
commit | 9739d754e72d82248c93e7d54d9b7f0cac669c28 (patch) | |
tree | 819fb90c88edcb605e72c2fc9dcd9930e363d6b7 /src/shell/history/entry.rs | |
parent | e9e6883e7ffaee7cc0e10d00a251e364b069ef83 (diff) | |
download | nbsh-9739d754e72d82248c93e7d54d9b7f0cac669c28.tar.gz nbsh-9739d754e72d82248c93e7d54d9b7f0cac669c28.zip |
simplify
Diffstat (limited to 'src/shell/history/entry.rs')
-rw-r--r-- | src/shell/history/entry.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/shell/history/entry.rs b/src/shell/history/entry.rs index 6cad678..ad931dc 100644 --- a/src/shell/history/entry.rs +++ b/src/shell/history/entry.rs @@ -63,7 +63,9 @@ impl Entry { }, ); - vt.bell(out, focused); + if vt.bell(focused) { + out.write(b"\x07"); + } Self::set_bgcolor(out, idx, focused); out.set_fgcolor(textmode::color::YELLOW); @@ -206,7 +208,9 @@ impl Entry { pub fn render_fullscreen(&self, out: &mut impl textmode::Textmode) { self.pty.with_vt_mut(|vt| { out.write(&vt.screen().state_formatted()); - vt.bell(out, true); + if vt.bell(true) { + out.write(b"\x07"); + } out.reset_attributes(); }); } |