From 17e28d5264c34075bdd4b5ebf2b7c0efb892ce2f Mon Sep 17 00:00:00 2001 From: Denis Lisov Date: Sat, 21 May 2022 00:06:36 +0300 Subject: actionExpandOrCollapseAllBranches: NOP 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 cb132b4a..9e3b94b3 100644 --- a/Action.c +++ b/Action.c @@ -242,6 +242,9 @@ static Htop_Reaction actionToggleTreeView(State* st) { static Htop_Reaction actionExpandOrCollapseAllBranches(State* st) { ScreenSettings* ss = st->settings->ss; + if (!ss->treeView) { + return HTOP_OK; + } ss->allBranchesCollapsed = !ss->allBranchesCollapsed; if (ss->allBranchesCollapsed) ProcessList_collapseAllBranches(st->pl); -- cgit v1.2.3