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:
ebignumber
2026-06-29 13:05:07 -04:00
committed by GitHub
parent cf2b0546c7
commit 83eeecb22b

View File

@@ -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;