From 9739d754e72d82248c93e7d54d9b7f0cac669c28 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 5 Mar 2022 13:36:41 -0500 Subject: simplify --- src/shell/history/entry.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/shell/history/entry.rs') 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(); }); } -- cgit v1.2.3-54-g00ecf