Skip to content

Commit 25460fb

Browse files
authored
Merge pull request #1956 from fasterit/fix-search-function
Fix search function
2 parents 13187f2 + 39a922c commit 25460fb

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

IncSet.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ bool IncSet_handleKey(IncSet* this, int ch, Panel* panel, IncMode_GetPanelValue
246246
IncSet_deactivate(this, panel);
247247
doSearch = false;
248248
filterChanged = mode->isFilter;
249-
} else if (ch == 27) {
250-
/* Esc aborts */
249+
} else if (ch == 27 || ch == KEY_MOUSE || ch == KEY_RECLICK) {
250+
/* Esc or panel click aborts */
251251
if (this->history)
252252
History_resetPosition(this->history);
253253
if (mode->isFilter) {

MainPanel.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
105105
reaction = HTOP_REFRESH | HTOP_REDRAW_BAR;
106106
}
107107
if (this->inc->found && this->inc->active && !this->inc->active->isFilter) {
108-
reaction |= Action_follow(this->state);
108+
host->activeTable->following = MainPanel_selectedRow(this);
109+
Panel_setSelectionColor(super, PANEL_SELECTION_FOLLOW);
109110
reaction |= HTOP_KEEP_FOLLOWING;
110111
}
111112
result = HANDLED;

0 commit comments

Comments
 (0)