qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs qe.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs qe.c
Date: Sat, 15 Aug 2015 14:18:51 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        15/08/15 14:18:51

Modified files:
        .              : qe.c 

Log message:
        complete: do case insensitive matching

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.196&r2=1.197

Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.196
retrieving revision 1.197
diff -u -b -r1.196 -r1.197
--- qe.c        15 Aug 2015 13:08:42 -0000      1.196
+++ qe.c        15 Aug 2015 14:18:51 -0000      1.197
@@ -5185,17 +5185,20 @@
     cp->len = eb_get_contents(s->b, cp->current, sizeof(cp->current));
 }
 
-/* XXX: should have a globbing and a case insensitive option */
+/* XXX: should have a globbing option */
 void complete_test(CompleteState *cp, const char *str)
 {
     QEmacsState *qs = &qe_state;
     int fuzzy = 0;
 
     if (memcmp(str, cp->current, cp->len)) {
-        if (!qs->fuzzy_search
-        ||  !strmem(str, cp->current, cp->len))
-            return;
+        if (!qe_memicmp(str, cp->current, cp->len))
         fuzzy = 1;
+        else
+        if (qs->fuzzy_search && strmem(str, cp->current, cp->len))
+            fuzzy = 2;
+        else
+            return;
     }
     add_string(&cp->cs, str, fuzzy);
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]