diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-25 17:22:10 +0000 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-25 17:22:10 +0000 |
| commit | b6f945da35065f0a0d3b384b4d0f167908c0140f (patch) | |
| tree | 2fe792360569c829ca4bdd2c66f3a6a9e0748e7f /src/common/input/handler.rs | |
| parent | Converted tab updates to the new generic update() function (diff) | |
| download | sl0ppij-b6f945da35065f0a0d3b384b4d0f167908c0140f.tar.gz sl0ppij-b6f945da35065f0a0d3b384b4d0f167908c0140f.tar.xz sl0ppij-b6f945da35065f0a0d3b384b4d0f167908c0140f.zip | |
Wrap up the plugin system refactor, running everything through update()
Diffstat (limited to 'src/common/input/handler.rs')
| -rw-r--r-- | src/common/input/handler.rs | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/common/input/handler.rs b/src/common/input/handler.rs index 3444471a..33f4e5dc 100644 --- a/src/common/input/handler.rs +++ b/src/common/input/handler.rs @@ -7,7 +7,7 @@ use crate::errors::ContextType; use crate::os_input_output::OsApi; use crate::pty_bus::PtyInstruction; use crate::screen::ScreenInstruction; -use crate::wasm_vm::{NaughtyEventType, PluginInputType, PluginInstruction}; +use crate::wasm_vm::PluginInstruction; use crate::CommandIsExecuting; use termion::input::{TermRead, TermReadEventsAndRaw}; @@ -66,11 +66,6 @@ impl InputHandler { Ok((event, raw_bytes)) => match event { termion::event::Event::Key(key) => { let key = cast_termion_key(key); - // FIXME: This is a bit of a hack to get resizing to work! - drop( - self.send_screen_instructions - .send(ScreenInstruction::Render), - ); // FIXME this explicit break is needed because the current test // framework relies on it to not create dead threads that loop // and eat up CPUs. Do not remove until the test framework has @@ -237,27 +232,10 @@ impl InputHandler { .unwrap(); } Action::TabNameInput(c) => { - self.send_plugin_instructions - .send(PluginInstruction::Input( - PluginInputType::Event(NaughtyEventType::Tab), - c.clone(), - )) - .unwrap(); self.send_screen_instructions .send(ScreenInstruction::UpdateTabName(c)) .unwrap(); } - Action::SaveTabName => { - self.send_plugin_instructions - .send(PluginInstruction::Input( - PluginInputType::Event(NaughtyEventType::Tab), - vec![b'\n'], - )) - .unwrap(); - self.send_screen_instructions - .send(ScreenInstruction::UpdateTabName(vec![b'\n'])) - .unwrap(); - } Action::NoOp => {} } |
