Skip to content

Fix search function#1956

Open
fasterit wants to merge 2 commits intohtop-dev:mainfrom
fasterit:fix-search-function
Open

Fix search function#1956
fasterit wants to merge 2 commits intohtop-dev:mainfrom
fasterit:fix-search-function

Conversation

@fasterit
Copy link
Copy Markdown
Member

Fixing two funny bugs that remained after the line editor introduction:

  1. Clicking into the panel does not deactivate the search function
  2. Search activates the following function on every second keypress. Toggle != activate :)

@fasterit fasterit added this to the 3.5.1 milestone Apr 12, 2026
@fasterit fasterit added the bug 🐛 Something isn't working label Apr 12, 2026
} else if (ch != ERR && this->inc->active) {
bool filterChanged = IncSet_handleKey(this->inc, ch, super, MainPanel_getValue, NULL);
/* A click in the panel body aborts the search/filter */
int keyToHandle = (ch == KEY_MOUSE || ch == KEY_RECLICK) ? 27 : ch;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

But doesn't this decentralize key handling for the incset somewhat?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It falls through to the line editor now and that one does not handle it. So that i-t-e seemed fine 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🐛 Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants