Code

Added support for FIND and FIND_NEXT.
authorKalle Wallin <kaw@linux.se>
Tue, 23 Mar 2004 22:23:44 +0000 (22:23 +0000)
committerKalle Wallin <kaw@linux.se>
Tue, 23 Mar 2004 22:23:44 +0000 (22:23 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@423 09075e82-0dd4-0310-85a5-a0d7c8717e4f

screen_help.c

index d38e4a6c9499918543ea0cd87e72204603af5fde..3f10f9223434c9b8251ac694fb825f6bd58e97e9 100644 (file)
@@ -158,6 +158,29 @@ help_cmd(screen_t *screen, mpd_client_t *c, command_t cmd)
       list_window_next_page(screen->helplist, help_text_rows);
       screen->helplist->repaint  = 1;
       break;
+    case CMD_LIST_FIND:
+      if( screen->findbuf )
+       {
+         free(screen->findbuf);
+         screen->findbuf=NULL;
+       }
+      /* continue... */
+    case CMD_LIST_FIND_NEXT:
+      if( !screen->findbuf )
+       screen->findbuf=screen_readln(screen->status_window.w, "/");
+      if( list_window_find(screen->helplist,
+                          list_callback,
+                          c,
+                          screen->findbuf) == 0 )
+       {
+         screen->helplist->repaint  = 1;
+       }
+      else
+       {
+         screen_status_printf("Unable to find \'%s\'", screen->findbuf);
+         beep();
+       }
+      break;
     default:
       return 0;
     }