Skip to content

Commit

Permalink
Resetting last selection on page navigation in optionsMenu to avoid u…
Browse files Browse the repository at this point in the history
…nordered_map error
  • Loading branch information
seth-wood committed Feb 13, 2025
1 parent 1a9d4ac commit 7f6e02c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/btop_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1314,10 +1314,12 @@ namespace Menu {
else if (pages > 1 and key == "page_down") {
if (++page >= pages) page = 0;
selected = 0;
last_sel = -1;
}
else if (pages > 1 and key == "page_up") {
if (--page < 0) page = pages - 1;
selected = 0;
last_sel = -1;
}
else if (key == "tab") {
if (++selected_cat >= (int)categories.size()) selected_cat = 0;
Expand Down

0 comments on commit 7f6e02c

Please sign in to comment.