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

PATCH: Re: Path completion - cursor misplaced



Andrej Borsenkow wrote:

> With current CVS:
> 
> bor@itsrm2% gzcat /u/p/u/t/.gz<TAB>
> 
> bor@itsrm2% gzcat /u2/pub/unix/texi2html/texi2html.tar<CURSOR>.gz
> Completing file
> texi2html-1.61.tar.gz   texi2html.tar.gz
> 
> But the common prefix is texi2html?
> 
> ...
>
> zstyle ':completion:*:*:all-files' matcher 'r:|[.-]=**'
> zstyle ':completion:*:cd:*' matcher 'r:|[.-]=**'

Urgh, again trouble with that. I was always against it...

Bye
 Sven

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.3
diff -u -r1.3 compmatch.c
--- Src/Zle/compmatch.c	2000/04/03 12:14:52	1.3
+++ Src/Zle/compmatch.c	2000/04/07 09:10:58
@@ -1705,11 +1705,17 @@
 	    a->prefix = cp_cline(ca, 0);
 
 	    if (anew) {
+		int f = e->flags;
+
 		join_psfx(e, a, NULL, NULL, 0);
+		e->flags = f;
 		if (e->prefix)
 		    return max - min;
 	    } else {
+		int f = e->flags;
+
 		join_psfx(a, e, NULL, NULL, 0);
+		e->flags = f;
 		if (a->prefix)
 		    return max - min;
 	    }

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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