Skip to content

Commit

Permalink
fixed playlist name searching (cmus#906)
Browse files Browse the repository at this point in the history
Fixes cmus#905.
  • Loading branch information
jwparkau authored and flyingmutant committed Jun 21, 2019
1 parent 2748d40 commit 1ed60b5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pl.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,12 @@ static int pl_search_matches(void *data, struct iter *iter, const char *text)

char **words = get_words(text);
for (size_t i = 0; words[i]; i++) {
if (u_strcasestr_base(pl->name, words[i])) {
matched = 1;

/* set in the loop to deal with empty search string */
matched = 1;

if (!u_strcasestr_base(pl->name, words[i])) {
matched = 0;
break;
}
}
Expand Down

0 comments on commit 1ed60b5

Please sign in to comment.