From 0b1bcfae90fd169c76ac541dc58ab5eae7d6f66f Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Tue, 23 Mar 2004 22:23:44 +0000 Subject: [PATCH] Added support for FIND and FIND_NEXT. git-svn-id: https://svn.musicpd.org/ncmpc/trunk@423 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- screen_help.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/screen_help.c b/screen_help.c index d38e4a6..3f10f92 100644 --- a/screen_help.c +++ b/screen_help.c @@ -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; } -- 2.30.2