summaryrefslogtreecommitdiffstats
path: root/MainPanel.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-23 16:23:18 +0100
committerBenBE <BenBE@geshi.org>2020-11-28 19:49:38 +0100
commit19b514168553c75a3d5a012b781efbfd00fccc08 (patch)
treee74918f4b1dad2b83b67e16cb235fc5c8b23b208 /MainPanel.c
parentea4f33409a978140493a43567fa3a3454ab03479 (diff)
Hide process selection on ESC
Do not highlight the current process line after pressing ESC in the main screen. Restore after pressing any key.
Diffstat (limited to 'MainPanel.c')
-rw-r--r--MainPanel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/MainPanel.c b/MainPanel.c
index 6a9d6303..848deae9 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -57,6 +57,9 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
Htop_Reaction reaction = HTOP_OK;
+ if (ch != ERR)
+ this->state->hideProcessSelection = false;
+
if (EVENT_IS_HEADER_CLICK(ch)) {
int x = EVENT_HEADER_CLICK_GET_X(ch);
const ProcessList* pl = this->state->pl;
@@ -83,6 +86,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
}
result = HANDLED;
} else if (ch == 27) {
+ this->state->hideProcessSelection = true;
return HANDLED;
} else if (ch != ERR && ch > 0 && ch < KEY_MAX && this->keys[ch]) {
reaction |= (this->keys[ch])(this->state);

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