diff options
| author | mo8it <mo8it@proton.me> | 2024-04-10 15:56:38 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-10 15:56:38 +0200 |
| commit | 256c4013b759368b97f08aeb38d1b03f2eb42d7a (patch) | |
| tree | 51b06443cc8f4286d6c1f96bee0dbdde5449d95e /src/watch.rs | |
| parent | 27e95206658e8f86cad351ce163f03c0d36e05ea (diff) | |
Keep hint displayed after resizing the terminal
Diffstat (limited to 'src/watch.rs')
| -rw-r--r-- | src/watch.rs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/watch.rs b/src/watch.rs index cf63627..6d791f4 100644 --- a/src/watch.rs +++ b/src/watch.rs @@ -29,7 +29,6 @@ pub enum WatchExit { enum InputEvent { Hint, - Clear, List, Quit, Unrecognized(String), @@ -106,7 +105,6 @@ fn terminal_event_handler(tx: Sender<WatchEvent>) { KeyCode::Enter => { let input_event = match input.trim() { "h" | "hint" => InputEvent::Hint, - "c" | "clear" => InputEvent::Clear, "l" | "list" => break InputEvent::List, "q" | "quit" => break InputEvent::Quit, _ => InputEvent::Unrecognized(input.clone()), @@ -165,7 +163,7 @@ pub fn watch(state_file: &mut StateFile, exercises: &'static [Exercise]) -> Resu WatchEvent::Input(InputEvent::List) => { return Ok(WatchExit::List); } - WatchEvent::Input(InputEvent::Clear) | WatchEvent::TerminalResize => { + WatchEvent::TerminalResize => { watch_state.render()?; } WatchEvent::Input(InputEvent::Quit) => break, |
