summaryrefslogtreecommitdiffstats
path: root/ColumnsPanel.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2023-11-23 12:22:02 +0100
committerBenBE <BenBE@geshi.org>2023-12-26 15:14:19 +0100
commit6aa9ef2726e42c4ae062b55be4d5cc015767d997 (patch)
treed5bd033946b404fa99b70b0b1c560725cef302bf /ColumnsPanel.c
parenta98fc47ffe67e88b1a83f94382795b8787a9bfe8 (diff)
Fix code style
Diffstat (limited to 'ColumnsPanel.c')
-rw-r--r--ColumnsPanel.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/ColumnsPanel.c b/ColumnsPanel.c
index f395d9f6..0517ea7d 100644
--- a/ColumnsPanel.c
+++ b/ColumnsPanel.c
@@ -46,7 +46,6 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
case KEY_ENTER:
case KEY_MOUSE:
case KEY_RECLICK:
- {
if (selected < size - 1) {
this->moving = !(this->moving);
Panel_setSelectionColor(super, this->moving ? PANEL_SELECTION_FOLLOW : PANEL_SELECTION_FOCUS);
@@ -56,59 +55,45 @@ static HandlerResult ColumnsPanel_eventHandler(Panel* super, int ch) {
result = HANDLED;
}
break;
- }
case KEY_UP:
- {
- if (!this->moving) {
+ if (!this->moving)
break;
- }
- }
/* else fallthrough */
case KEY_F(7):
case '[':
case '-':
- {
if (selected < size - 1)
Panel_moveSelectedUp(super);
result = HANDLED;
break;
- }
case KEY_DOWN:
- {
- if (!this->moving) {
+ if (!this->moving)
break;
- }
- }
/* else fallthrough */
case KEY_F(8):
case ']':
case '+':
- {
if (selected < size - 2)
Panel_moveSelectedDown(super);
result = HANDLED;
break;
- }
case KEY_F(9):
case KEY_DC:
- {
- if (selected < size - 1) {
+ if (selected < size - 1)
Panel_remove(super, selected);
- }
result = HANDLED;
break;
- }
default:
- {
if (0 < ch && ch < 255 && isgraph((unsigned char)ch))
result = Panel_selectByTyping(super, ch);
if (result == BREAK_LOOP)
result = IGNORED;
break;
- }
}
+
if (result == HANDLED)
ColumnsPanel_update(super);
+
return result;
}

© 2014-2024 Faster IT GmbH | imprint | privacy policy