From 2b2420d0ebd4734b59f5d72ad2d5959af90da261 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Mon, 30 May 2022 12:32:05 +0200 Subject: actionExpandOrCollapse: NOOP in flat mode This shortcut does not have any visible effect in flat mode, so disable it completely to avoid possible confusion. --- Action.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Action.c b/Action.c index b7652487..ffc4a893 100644 --- a/Action.c +++ b/Action.c @@ -289,6 +289,9 @@ static Htop_Reaction actionInvertSortOrder(State* st) { } static Htop_Reaction actionExpandOrCollapse(State* st) { + if (!st->settings->ss->treeView) + return HTOP_OK; + bool changed = expandCollapse((Panel*)st->mainPanel); return changed ? HTOP_RECALCULATE : HTOP_OK; } -- cgit v1.2.3