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

RE: PATCH: completion positions



Felix Rosencrantz wrote:

> I've attached a patch for the first attempt at a test for insert_positions.
> I think there is a bug in the last test case, so I haven't tried to check in.
> 
> Sven, could you look at it.
> 
> I think the output should look like:
> +>line: {tst a}{.bC.cB.dA}
> +>COMPADD:{}
> +>INSERT_POSITIONS:{5:14}
> +>NO:{aA.bC.cB.dA}
> +>NO:{aD.bC.cB.dA}
> 
> But zsh seems to want to leave the cursor after the C, and insert_positions has
> three values rather than 2.

Indeed.  A bug when merging two CLF_MID entries. This should fix it.

Bye
 Sven

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.30
diff -u -r1.30 compmatch.c
--- Src/Zle/compmatch.c	2001/01/15 10:44:15	1.30
+++ Src/Zle/compmatch.c	2001/01/25 15:13:19
@@ -1627,7 +1627,7 @@
 	    *orest = NULL;
 	if (nrest)
 	    *nrest = n;
-	if (n)
+	if (n && n->wlen)
 	    ot->flags |= CLF_MISS;
 
 	return;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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