mirror of
https://github.com/aristocratos/btop.git
synced 2026-07-30 08:47:32 -04:00
feat: make '=' expand in tree view as well (#1735)
Aligns the behavior of the '=' key with the '+' key in tree view as it already does for updating the refresh rate. Closes: https://github.com/aristocratos/btop/issues/1734
This commit is contained in:
@@ -488,12 +488,12 @@ namespace Input {
|
||||
}
|
||||
Config::set("update_following", true);
|
||||
}
|
||||
else if (is_in(key, "+", "-", "space", "C") and Config::getB("proc_tree")) {
|
||||
else if (is_in(key, "+", "-", "space", "C", "=") and Config::getB("proc_tree")) {
|
||||
const bool is_following_detailed = Config::getB("follow_process") and Config::getI("followed_pid") == Config::getI("detailed_pid");
|
||||
if (Config::getI("proc_selected") > 0 or is_following_detailed) {
|
||||
atomic_wait(Runner::active);
|
||||
auto& pid = is_following_detailed and Config::getI("proc_selected") == 0 ? Config::getI("followed_pid") : Config::getI("selected_pid");
|
||||
if (key == "+" or key == "space") Proc::expand = pid;
|
||||
if (key == "+" or key == "space" or key == "=") Proc::expand = pid;
|
||||
if (key == "-" or key == "space") Proc::collapse = pid;
|
||||
if (key == "C") Proc::toggle_children = pid;
|
||||
no_update = false;
|
||||
|
||||
Reference in New Issue
Block a user