aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-09 03:23:18 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-09 03:23:18 -0500
commita610da0f7eaa08aa087bef766375481ad0959166 (patch)
treede5543a40aaf45ef8b8e651fa414e5f03881a289
parent505650dbca937c0d4cb64b29d75341f479a3b0d2 (diff)
downloadtextmode-a610da0f7eaa08aa087bef766375481ad0959166.tar.gz
textmode-a610da0f7eaa08aa087bef766375481ad0959166.zip
minor cleanups
-rw-r--r--examples/tmux.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/tmux.rs b/examples/tmux.rs
index 877285b..0ceb40b 100644
--- a/examples/tmux.rs
+++ b/examples/tmux.rs
@@ -106,6 +106,7 @@ impl State {
match input.read_key().await {
Ok(Some(key)) => {
if waiting_for_command {
+ waiting_for_command = false;
match key {
textmode::Key::Ctrl(b'n') => {
notify
@@ -129,11 +130,8 @@ impl State {
.await
.unwrap();
}
- _ => {
- // ignore
- }
+ _ => {} // ignore
}
- waiting_for_command = false;
} else {
match key {
textmode::Key::Ctrl(b'n') => {
@@ -170,7 +168,7 @@ impl State {
.spawn_pty(Some(&pty_process::Size::new(24, 80)))
.unwrap();
let child = std::sync::Arc::new(child);
- let vt = vt100::Parser::new(24, 80, 0);
+ let vt = vt100::Parser::default();
let screen = vt.screen().clone();
let vt = std::sync::Arc::new(smol::lock::Mutex::new(vt));
let id = self.next_window_id;