summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 98f27f8)
raw | patch | inline | side by side (parent: 98f27f8)
author | Max Kellermann <max@duempel.org> | |
Fri, 2 Oct 2009 08:53:47 +0000 (10:53 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 2 Oct 2009 08:53:47 +0000 (10:53 +0200) |
src/screen_search.c | patch | blob | history |
diff --git a/src/screen_search.c b/src/screen_search.c
index 269fedd058649529aca768d476e2de67c5bb6860..1710f5af0705df86f14728c11589be7cb3bf8726 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
return fl;
}
+static struct filelist *
+do_search(struct mpdclient *c, char *query)
+{
+ struct filelist *fl;
+
+ fl = search_advanced_query(query, c);
+ if (!advanced_search_mode && browser.filelist == NULL)
+ return filelist_search(c, FALSE,
+ mode[options.search_mode].table,
+ query);
+
+ return fl;
+}
+
static void
search_new(struct mpdclient *c)
{
browser.filelist = NULL;
}
- browser.filelist = search_advanced_query(pattern, c);
- if (!advanced_search_mode && browser.filelist == NULL)
- browser.filelist = filelist_search(c, FALSE,
- mode[options.search_mode].table,
- pattern);
-
+ browser.filelist = do_search(c, pattern);
if (browser.filelist == NULL)
browser.filelist = filelist_new();