summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraristocratos <gnmjpl@gmail.com>2021-11-08 18:48:11 +0100
committeraristocratos <gnmjpl@gmail.com>2021-11-08 18:48:11 +0100
commitc133997b210001c7ec9f556da438a71ebbd7edde (patch)
treef49bf642bf14005548e59ad05e184f8d20c2a346
parente4ac3d9b21549c8808ea5e3ada23924b91f72447 (diff)
Fixed: Inconsistent behaviour of "q" key in the menus
-rw-r--r--src/btop_input.cpp1
-rw-r--r--src/btop_menu.cpp5
2 files changed, 1 insertions, 5 deletions
diff --git a/src/btop_input.cpp b/src/btop_input.cpp
index a69e4bd..885121f 100644
--- a/src/btop_input.cpp
+++ b/src/btop_input.cpp
@@ -179,7 +179,6 @@ namespace Input {
while (cin.rdbuf()->in_avail() == first_num) {
if (first_num-- == 0) break;
cin.ignore(1);
-
}
}
diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp
index fa7f6a5..891ea1f 100644
--- a/src/btop_menu.cpp
+++ b/src/btop_menu.cpp
@@ -892,10 +892,7 @@ namespace Menu {
};
}
}
- else if (key == "q") {
- exit(0);
- }
- else if (is_in(key, "escape", "m", "mouse_click")) {
+ else if (is_in(key, "escape", "q", "m", "mouse_click")) {
return Closed;
}
else if (key.starts_with("button_")) {