diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-03 12:51:23 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-03 12:51:23 +0200 |
| commit | f7c16781c0d68b8a20bc5d88d0040940459b903e (patch) | |
| tree | 9608515db54b6aaaf23175d24ace523e0c0c0bb5 /src/app.rs | |
| parent | 4d4d72587185fb485fd6826514241680fc2d02ba (diff) | |
add default return value to keymap
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -85,10 +85,9 @@ impl App { fn handle_key_event(&mut self, event: KeyEvent) { let focus = { GlobalState::instance().active_window }; - let op = GlobalKeyMap::handle(event); + let populate = GlobalKeyMap::handle(event); - - if op.unwrap_or(true) { + if populate { match focus { Window::View => self.view.handle_key_event(event), Window::Editor => self.editor.handle_key_event(event), |