diff options
author | Nathan Scott <nathans@redhat.com> | 2020-08-20 09:42:40 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2020-08-20 09:42:40 +1000 |
commit | 46ab1aa3bdb94a9779c2ec24abb4839cf5111dda (patch) | |
tree | a841c09d88fe5b7e20a76daab4acbb7a53abc0b6 /Action.c | |
parent | 500fb283e9b86a6580cedbf834aea9d7dd639a66 (diff) | |
parent | 8d7afb33e2e35fc0a34c1b9b0e7ce4cb3b3d5f86 (diff) |
Merge branch 'hishamhm-pull-850'
Diffstat (limited to 'Action.c')
-rw-r--r-- | Action.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -248,10 +248,21 @@ static Htop_Reaction actionIncFilter(State* st) { } static Htop_Reaction actionIncSearch(State* st) { + IncSet_reset(((MainPanel*)st->panel)->inc, INC_SEARCH); IncSet_activate(((MainPanel*)st->panel)->inc, INC_SEARCH, st->panel); return HTOP_REFRESH | HTOP_KEEP_FOLLOWING; } +static Htop_Reaction actionIncNext(State* st) { + IncSet_next(((MainPanel*)st->panel)->inc, INC_SEARCH, st->panel, (IncMode_GetPanelValue) MainPanel_getValue); + return HTOP_REFRESH | HTOP_KEEP_FOLLOWING; +} + +static Htop_Reaction actionIncPrev(State* st) { + IncSet_prev(((MainPanel*)st->panel)->inc, INC_SEARCH, st->panel, (IncMode_GetPanelValue) MainPanel_getValue); + return HTOP_REFRESH | HTOP_KEEP_FOLLOWING; +} + static Htop_Reaction actionHigherPriority(State* st) { bool changed = changePriority((MainPanel*)st->panel, -1); return changed ? HTOP_REFRESH : HTOP_OK; @@ -559,6 +570,8 @@ void Action_setBindings(Htop_Action* keys) { keys['\\'] = actionIncFilter; keys[KEY_F(3)] = actionIncSearch; keys['/'] = actionIncSearch; + keys['n'] = actionIncNext; + keys['N'] = actionIncPrev; keys[']'] = actionHigherPriority; keys[KEY_F(7)] = actionHigherPriority; |