diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-11-04 13:24:15 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-11-04 13:24:15 +0100 |
commit | 6de940fe96d19283eaeebcfc8ba6fb5997f17e6f (patch) | |
tree | 6c8c98338f009e04f4afa8694fa7d35ad421651a /nncmpp.c | |
parent | 6bd8c1db2fa84b414db73cfde842dfb31b039913 (diff) | |
download | nncmpp-6de940fe96d19283eaeebcfc8ba6fb5997f17e6f.tar.gz nncmpp-6de940fe96d19283eaeebcfc8ba6fb5997f17e6f.tar.xz nncmpp-6de940fe96d19283eaeebcfc8ba6fb5997f17e6f.zip |
Do not beep on focus changes
Diffstat (limited to 'nncmpp.c')
-rw-r--r-- | nncmpp.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -2586,10 +2586,12 @@ app_init_bindings (const char *keymap, static bool app_process_termo_event (termo_key_t *event) { - if (event->type == TERMO_TYPE_FOCUS) + bool handled = false; + if ((handled = event->type == TERMO_TYPE_FOCUS)) { g.focused = !!event->code.focused; app_invalidate (); + // Senseless fall-through } struct binding dummy = { *event, 0, 0 }, *binding; @@ -2599,7 +2601,7 @@ app_process_termo_event (termo_key_t *event) sizeof *binding, app_binding_cmp))) return app_editor_process_action (binding->action); if (event->type != TERMO_TYPE_KEY || event->modifiers != 0) - return false; + return handled; line_editor_insert (&g.editor, event->code.codepoint); app_invalidate (); @@ -2618,7 +2620,7 @@ app_process_termo_event (termo_key_t *event) if (app_goto_tab ((n == 0 ? 10 : n) - 1)) return true; } - return false; + return handled; } // --- Current tab ------------------------------------------------------------- |