From: Kalle Wallin Date: Mon, 22 Mar 2004 18:50:21 +0000 (+0000) Subject: Modified list_window_find() - case independet search (strcasecmp). X-Git-Tag: v0.12_alpha1~672 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=100c1e6babd68573344527f31648503f34a802cf;p=ncmpc.git Modified list_window_find() - case independet search (strcasecmp). git-svn-id: https://svn.musicpd.org/ncmpc/trunk@371 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- diff --git a/screen_utils.c b/screen_utils.c index 1647fff..d467c1a 100644 --- a/screen_utils.c +++ b/screen_utils.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -160,14 +161,13 @@ list_window_find(list_window_t *lw, void *callback_data, char *str) { + int h; int i = lw->selected+1; + char *label; - while( i< lw->rows ) + while( (label=(callback) (i,&h,callback_data)) ) { - int h; - char *label = (callback) (i,&h,callback_data); - - if( str && label && strstr(label, str) ) + if( str && label && strcasestr(label, str) ) { lw->selected = i; return 0;