diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-03 11:06:14 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2024-08-03 11:06:14 +0200 |
| commit | 90daf295c7dd5fedc3219b8947fac110f05cc522 (patch) | |
| tree | a8cc7dba65f1c8a6b7ed5e528e65bc86885d3c22 /src/app.rs | |
| parent | cd907dd59a48c2aa9d602aa3fb2f24563994420e (diff) | |
add editor keymap
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -85,8 +85,10 @@ impl App { fn handle_key_event(&mut self, event: KeyEvent) { let focus = { GlobalState::instance().active_window }; + let op = GlobalKeyMap::handle(event); - if !GlobalKeyMap::handle(event) { + + if op.unwrap_or(true) { match focus { Window::View => self.view.handle_key_event(event), Window::Editor => self.editor.handle_key_event(event), |