mirror of
https://github.com/FliegendeWurst/inboxid.git
synced 2024-11-08 10:20:39 +00:00
browse: use Alacritty locking escape sequences
TODO: extract this into a backend crate
This commit is contained in:
parent
316ac357a3
commit
2aca3bd8d5
@ -427,10 +427,15 @@ fn show_listing(mailbox: &str) -> Result<()> {
|
||||
tree.on_event(Event::Key(Key::End))
|
||||
}).unwrap().process(&mut siv);
|
||||
siv.refresh();
|
||||
siv.backend.as_any_mut().downcast_mut::<cursive::backends::termion::Backend>().unwrap().terminal.get_mut().write_all(&[b'\x1b', b'\x50', b't', b'm', b'u', b'x', b';', b'\x1b', b'\x1b', b'\x50', b'=', b'2', b's', b'\x1b', b'\x1b', b'\x5c', b'\x1b', b'\\']).unwrap();
|
||||
siv.backend.as_any_mut().downcast_mut::<cursive::backends::termion::Backend>().unwrap().terminal.get_mut().flush().unwrap();
|
||||
*siv.backend.as_any_mut().downcast_mut::<cursive::backends::termion::Backend>().unwrap().locked.get_mut() = false;
|
||||
while siv.is_running() {
|
||||
siv.step();
|
||||
while !siv.step() {}
|
||||
siv.backend.as_any_mut().downcast_mut::<cursive::backends::termion::Backend>().unwrap().terminal.get_mut().write_all(&[b'\x1b', b'\x50', b't', b'm', b'u', b'x', b';', b'\x1b', b'\x1b', b'\x50', b'=', b'2', b's', b'\x1b', b'\x1b', b'\x5c', b'\x1b', b'\\']).unwrap();
|
||||
siv.backend.as_any_mut().downcast_mut::<cursive::backends::termion::Backend>().unwrap().terminal.get_mut().flush().unwrap();
|
||||
*siv.backend.as_any_mut().downcast_mut::<cursive::backends::termion::Backend>().unwrap().locked.get_mut() = false;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user