diff options
author | Daniel Lange <DLange@git.local> | 2016-07-25 18:25:28 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-07-25 18:25:28 +0200 |
commit | 31b71b67011fa52f091df6fe536a11d6d0bfb256 (patch) | |
tree | 31cb222871017376af8b7435d24cf4961863fa93 /MainPanel.c | |
parent | 8c82a38002ce09db2a0b83dab8b598cf1ab0596c (diff) | |
download | debian_htop-31b71b67011fa52f091df6fe536a11d6d0bfb256.tar.gz debian_htop-31b71b67011fa52f091df6fe536a11d6d0bfb256.tar.bz2 debian_htop-31b71b67011fa52f091df6fe536a11d6d0bfb256.zip |
Imported Upstream version 2.0.2upstream/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; |