ok oga
This commit is contained in:
tobias 2009-09-05 14:10:11 +00:00
parent 96c773e112
commit 6e4f4540c2

View File

@ -243,14 +243,14 @@ menu_handle_key(XEvent *e, struct menu_ctx *mc, struct menu_q *menuq,
} }
mc->noresult = 0; mc->noresult = 0;
if (mc->changed && strlen(mc->searchstr) > 0) { if (mc->changed && mc->searchstr[0] != '\0') {
(*mc->match)(menuq, resultq, mc->searchstr); (*mc->match)(menuq, resultq, mc->searchstr);
/* If menuq is empty, never show we've failed */ /* If menuq is empty, never show we've failed */
mc->noresult = TAILQ_EMPTY(resultq) && !TAILQ_EMPTY(menuq); mc->noresult = TAILQ_EMPTY(resultq) && !TAILQ_EMPTY(menuq);
} else if (mc->changed) } else if (mc->changed)
TAILQ_INIT(resultq); TAILQ_INIT(resultq);
if (!mc->list && mc->listing && !mc->changed) { if (!mc->list && mc->listing && !mc->changed) {
TAILQ_INIT(resultq); TAILQ_INIT(resultq);
mc->listing = 0; mc->listing = 0;
} }