From 31b71b67011fa52f091df6fe536a11d6d0bfb256 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 25 Jul 2016 18:25:28 +0200 Subject: Imported Upstream version 2.0.2 --- MainPanel.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'MainPanel.c') diff --git a/MainPanel.c b/MainPanel.c index f9b45d6..7aca7ed 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -83,6 +83,9 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { result = HANDLED; } else if (ch != ERR && this->inc->active) { bool filterChanged = IncSet_handleKey(this->inc, ch, super, (IncMode_GetPanelValue) MainPanel_getValue, NULL); + if (this->inc->found) { + reaction |= Action_follow(this->state); + } if (filterChanged) { this->state->pl->incFilter = IncSet_filter(this->inc); reaction = HTOP_REFRESH | HTOP_REDRAW_BAR; @@ -102,20 +105,6 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) { } else { reaction |= HTOP_KEEP_FOLLOWING; } - switch (ch) { - case KEY_LEFT: - case KEY_CTRLB: - if (super->scrollH > 0) { - super->scrollH -= CRT_scrollHAmount; - super->needsRedraw = true; - } - return HANDLED; - case KEY_RIGHT: - case KEY_CTRLF: - super->scrollH += CRT_scrollHAmount; - super->needsRedraw = true; - return HANDLED; - } } if (reaction & HTOP_REDRAW_BAR) { @@ -159,7 +148,7 @@ const char* MainPanel_getValue(MainPanel* this, int i) { return ""; } -bool MainPanel_foreachProcess(MainPanel* this, MainPanel_ForeachProcessFn fn, int arg, bool* wasAnyTagged) { +bool MainPanel_foreachProcess(MainPanel* this, MainPanel_ForeachProcessFn fn, size_t arg, bool* wasAnyTagged) { Panel* super = (Panel*) this; bool ok = true; bool anyTagged = false; -- cgit v1.2.3