patch: make quick search aware of case sensitivity (trying again)

Now, even if files in a panel are sorted case insensitively, quick search (alt-s) still is case sensitive. 
This is wrong, because if I don't care about case when sorting files, chances are I care about it even less 
when doing a quick search. Here's a patch that uses sensitive or insensitive search depending on the panel's 
case_sensitive setting (which can be set in the "sort order" dialog):

--- screen.c    2002-12-26 12:20:51.000000000 -0400
+++ screen-new.c        2003-01-09 23:45:49.000000000 -0400
@@ -1881,7 +1881,7 @@
            wrapped = 1;
-       if (STRNCOMP (panel->dir.list [i].fname, panel->search_buffer, l) == 0){
+       if (panel->case_sensitive? (STRNCOMP (panel->dir.list [i].fname, panel->search_buffer, l) == 0) : 
(strncasecmp (panel->dir.list [i].fname, panel->search_buffer, l) == 0)){
            unselect_item (panel);
            panel->selected = i;
            select_item (panel);

Sign-up for your own FREE Personalized E-mail at

Meet Singles

Attachment: qsearch-case-sensitive
Description: Binary data

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]