Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: partial word completion



Some recent changes made a small bug show up, where, for example,
completion on an empty word in a directory with `foo.bar.baz' and
`boo.far.faz' inserted `.'.

The problem was that too many cline structs got the CLF_NEW flag
removed (CLF_NEW indicates newly build parts without anything
corresponding on the line).

Bye
 Sven

P.S.:     Are the log messages and the version numbers (_path_files went
          from 1.2 to 1.4) ok, or am I doing something wrong?
P.P.S.:   Yeah, right, I haven't tried to understand everything about
          CVS' version numbering facilities yet.
P.P.P.S.: Have I just made a fool out of myself?

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.2
diff -u -r1.2 compmatch.c
--- Src/Zle/compmatch.c	2000/04/01 20:49:48	1.2
+++ Src/Zle/compmatch.c	2000/04/03 11:58:52
@@ -351,7 +351,6 @@
 
     p = bld_parts(s, sl, osl, &lp);
 
-    p->flags &= ~CLF_NEW;
     if (m && (m->flags & CMF_LEFT)) {
 	lp->flags |= CLF_SUF;
 	lp->suffix = lp->prefix;
@@ -384,7 +383,8 @@
     lp->line = l; lp->llen = wl;
     lp->word = w; lp->wlen = wl;
     lp->orig = o; lp->olen = ol;
-    lp->flags &= ~CLF_NEW;
+    if (o || ol)
+	lp->flags &= ~CLF_NEW;
 
     /* Finally, put the new parts on the list. */
     if (matchlastpart)

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author