mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-01 13:26:44 +02:00
simplify code a bit
This commit is contained in:
@ -168,7 +168,7 @@ static void prompt_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
else if (key == KEY_UP) { /* fetches previous item in history */
|
||||
if (prt->hst_pos >= 0) {
|
||||
wmove(self->window, prt->orig_y, X_OFST);
|
||||
fetch_hist_item(prt->line, &prt->pos, &prt->len, prt->ln_history, &prt->hst_tot,
|
||||
fetch_hist_item(prt->line, &prt->pos, &prt->len, prt->ln_history, prt->hst_tot,
|
||||
&prt->hst_pos, LN_HIST_MV_UP);
|
||||
}
|
||||
}
|
||||
@ -176,7 +176,7 @@ static void prompt_onKey(ToxWindow *self, Tox *m, wint_t key)
|
||||
else if (key == KEY_DOWN) { /* fetches next item in history */
|
||||
if (prt->hst_pos < prt->hst_tot) {
|
||||
wmove(self->window, prt->orig_y, X_OFST);
|
||||
fetch_hist_item(prt->line, &prt->pos, &prt->len, prt->ln_history, &prt->hst_tot,
|
||||
fetch_hist_item(prt->line, &prt->pos, &prt->len, prt->ln_history, prt->hst_tot,
|
||||
&prt->hst_pos, LN_HIST_MV_DWN);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user