Code

mpdclient: move code to mpdclient_invoke_error_callback()
[ncmpc.git] / src / screen_search.c
index 0d39ddb151e76c6b7b7a32fd8b520d8bef778ac7..90e075fe96c95d2da9469a74c5bb5ac421d0b997 100644 (file)
@@ -1,5 +1,5 @@
 /* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
+ * (c) 2004-2017 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
  *
  * This program is free software; you can redistribute it and/or modify
@@ -352,6 +352,11 @@ static void
 screen_search_init(WINDOW *w, int cols, int rows)
 {
        browser.lw = list_window_init(w, cols, rows);
+       if (options.search_format != NULL) {
+               browser.song_format = options.search_format;
+       } else {
+               browser.song_format = options.list_format;
+       }
        list_window_set_length(browser.lw, G_N_ELEMENTS(help_text));
 }
 
@@ -436,7 +441,7 @@ screen_search_cmd(struct mpdclient *c, command_t cmd)
                        options.search_mode = 0;
                screen_status_printf(_("Search mode: %s"),
                                     _(mode[options.search_mode].label));
-               /* continue and update... */
+               /* fall through */
        case CMD_SCREEN_UPDATE:
                screen_search_reload(c);
                search_repaint();