changed bell style option to a simple boolean

This commit is contained in:
2026-02-23 14:06:10 -05:00
parent 6f334395f7
commit 5a8b7831a8
4 changed files with 16 additions and 35 deletions

View File

@@ -223,11 +223,8 @@ impl FernVi {
let hint = self.history.get_hint();
self.editor.set_hint(hint);
}
None => match read_shopts(|s| s.core.bell_style) {
crate::shopt::FernBellStyle::Audible => {
self.writer.send_bell().ok();
}
crate::shopt::FernBellStyle::Visible | crate::shopt::FernBellStyle::Disable => {}
None => {
self.writer.send_bell().ok();
},
}

View File

@@ -977,14 +977,8 @@ impl LineWriter for TermWriter {
}
fn send_bell(&mut self) -> ShResult<()> {
match read_shopts(|o| o.core.bell_style) {
FernBellStyle::Audible => {
self.flush_write("\x07")?;
}
FernBellStyle::Visible => {
log::warn!("Visual bell is not supported in fern shell yet");
}
FernBellStyle::Disable => { /* Do nothing */ }
if read_shopts(|o| o.core.bell_enabled) {
self.flush_write("\x07")?;
}
Ok(())
}