diff options
author | Benny Baumann <BenBE@geshi.org> | 2020-11-21 17:00:58 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2020-12-03 22:41:31 +0100 |
commit | a7955c49668dfee4f413747a2fafa6850c6c502a (patch) | |
tree | c462d8571510fb79ff72afdbd1a7c1808b34bf0a | |
parent | c49ca61dd92a79499ca0cc21541960d33354a654 (diff) |
Reduce code duplication
-rw-r--r-- | Panel.c | 14 |
1 files changed, 6 insertions, 8 deletions
@@ -330,22 +330,20 @@ bool Panel_onKey(Panel* this, int key) { switch (key) { case KEY_DOWN: case KEY_CTRL('N'): - this->selected++; - break; - case KEY_UP: - case KEY_CTRL('P'): - this->selected--; - break; #ifdef KEY_C_DOWN case KEY_C_DOWN: + #endif this->selected++; break; - #endif + + case KEY_UP: + case KEY_CTRL('P'): #ifdef KEY_C_UP case KEY_C_UP: + #endif this->selected--; break; - #endif + case KEY_LEFT: case KEY_CTRL('B'): if (this->scrollH > 0) { |