changed bell style option to a simple boolean
This commit is contained in:
@@ -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();
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -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(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user