summaryrefslogtreecommitdiffstats
path: root/MainPanel.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2022-10-20 20:08:25 +0200
committerBenBE <BenBE@geshi.org>2022-10-20 22:42:26 +0200
commitd83948ed09039864cdaf6066a1bd64476211ecaa (patch)
tree9d1228083339cc771f67d59c2c25beb5284f0483 /MainPanel.c
parentfc5c622ce3076034831082094d30590bc04f92d6 (diff)
Check for action flags correctly
Actions are not simple flags with a single bit set, but might have multiple bits set for implying actions. Do not handle an action if only an implying bit is set. Fixes: edc3de7cb597 ("Action: specify implication in code not in comments")
Diffstat (limited to 'MainPanel.c')
-rw-r--r--MainPanel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/MainPanel.c b/MainPanel.c
index b231fbcb..89b4e7d4 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -122,28 +122,28 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
}
}
- if (reaction & HTOP_REDRAW_BAR) {
+ if ((reaction & HTOP_REDRAW_BAR) == HTOP_REDRAW_BAR) {
MainPanel_updateLabels(this, settings->ss->treeView, this->state->pl->incFilter);
}
- if (reaction & HTOP_RESIZE) {
+ if ((reaction & HTOP_RESIZE) == HTOP_RESIZE) {
result |= RESIZE;
}
- if (reaction & HTOP_UPDATE_PANELHDR) {
+ if ((reaction & HTOP_UPDATE_PANELHDR) == HTOP_UPDATE_PANELHDR) {
result |= REDRAW;
}
- if (reaction & HTOP_REFRESH) {
+ if ((reaction & HTOP_REFRESH) == HTOP_REFRESH) {
result |= REFRESH;
}
- if (reaction & HTOP_RECALCULATE) {
+ if ((reaction & HTOP_RECALCULATE) == HTOP_RECALCULATE) {
result |= RESCAN;
}
- if (reaction & HTOP_SAVE_SETTINGS) {
+ if ((reaction & HTOP_SAVE_SETTINGS) == HTOP_SAVE_SETTINGS) {
this->state->settings->changed = true;
}
- if (reaction & HTOP_QUIT) {
+ if ((reaction & HTOP_QUIT) == HTOP_QUIT) {
return BREAK_LOOP;
}
- if (!(reaction & HTOP_KEEP_FOLLOWING)) {
+ if ((reaction & HTOP_KEEP_FOLLOWING) != HTOP_KEEP_FOLLOWING) {
this->state->pl->following = -1;
Panel_setSelectionColor(super, PANEL_SELECTION_FOCUS);
}

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