diff options
author | Daniel Lange <DLange@git.local> | 2016-07-25 18:25:29 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-07-25 18:25:29 +0200 |
commit | aed86a83b9120528c2a2a5c137d443917682d4b4 (patch) | |
tree | 979855616d56f2864dedc7b88798e9831614e9ee /MainPanel.c | |
parent | 6ca259100661aa0be46c8645773d32a8a6a5f312 (diff) | |
parent | 31b71b67011fa52f091df6fe536a11d6d0bfb256 (diff) | |
download | debian_htop-aed86a83b9120528c2a2a5c137d443917682d4b4.tar.gz debian_htop-aed86a83b9120528c2a2a5c137d443917682d4b4.tar.bz2 debian_htop-aed86a83b9120528c2a2a5c137d443917682d4b4.zip |
Merge tag 'upstream/2.0.2'
Upstream version 2.0.2
Diffstat (limited to 'MainPanel.c')
-rw-r--r-- | MainPanel.c | 19 |
1 files changed, 4 insertions, 15 deletions
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; |