From 7a3feb12511fa02361f3cdd0e62396c084b143ad Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 10 Dec 2008 19:47:25 +0100 Subject: list_window: moved string matching to match.h Provide the new function match_line() which searches a string for a needle (ignoring case). This wraps the non-standard function strcasestr(). --- src/list_window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/list_window.c') diff --git a/src/list_window.c b/src/list_window.c index ea4b3c28e..010deb860 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -20,7 +20,7 @@ #include "config.h" #include "options.h" #include "charset.h" -#include "support.h" +#include "match.h" #include "command.h" #include "colors.h" @@ -223,7 +223,7 @@ list_window_find(struct list_window *lw, do { while ((label = callback(i,&h,callback_data))) { - if (str && label && strcasestr(label, str)) { + if (str && label && match_line(label, str)) { lw->selected = i; return true; } @@ -259,7 +259,7 @@ list_window_rfind(struct list_window *lw, do { while (i >= 0 && (label = callback(i,&h,callback_data))) { - if( str && label && strcasestr(label, str) ) { + if( str && label && match_line(label, str) ) { lw->selected = i; return true; } -- cgit v1.2.3