From 100c1e6babd68573344527f31648503f34a802cf Mon Sep 17 00:00:00 2001 From: Kalle Wallin Date: Mon, 22 Mar 2004 18:50:21 +0000 Subject: [PATCH] Modified list_window_find() - case independet search (strcasecmp). git-svn-id: https://svn.musicpd.org/ncmpc/trunk@371 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- screen_utils.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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; -- 2.30.2