forked from NotAShelf/beer
config: default cursor style/blink and visual bell
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ibd512084374fe4723ee267a916187af56a6a6964
This commit is contained in:
parent
2d319b7e73
commit
0738ce3b6f
4 changed files with 90 additions and 1 deletions
|
|
@ -100,6 +100,8 @@ pub struct Term {
|
|||
clipboard_ops: Vec<ClipboardOp>,
|
||||
/// The active colour scheme (seeded from config, mutated by OSC escapes).
|
||||
theme: Theme,
|
||||
/// Set when the child rings the bell (`BEL`); cleared by the front-end.
|
||||
bell: bool,
|
||||
}
|
||||
|
||||
impl Term {
|
||||
|
|
@ -115,9 +117,15 @@ impl Term {
|
|||
xtgettcap: None,
|
||||
clipboard_ops: Vec::new(),
|
||||
theme: Theme::default(),
|
||||
bell: false,
|
||||
}
|
||||
}
|
||||
|
||||
/// Take and clear the pending bell flag.
|
||||
pub fn take_bell(&mut self) -> bool {
|
||||
std::mem::take(&mut self.bell)
|
||||
}
|
||||
|
||||
/// Drain the OSC 52 clipboard requests accumulated since the last call.
|
||||
pub fn take_clipboard_ops(&mut self) -> Vec<ClipboardOp> {
|
||||
std::mem::take(&mut self.clipboard_ops)
|
||||
|
|
@ -535,6 +543,7 @@ impl Perform for Term {
|
|||
|
||||
fn execute(&mut self, byte: u8) {
|
||||
match byte {
|
||||
0x07 => self.bell = true,
|
||||
0x08 => self.grid.backspace(),
|
||||
0x09 => self.grid.tab(),
|
||||
0x0A..=0x0C => self.grid.line_feed(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue