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

PATCH: remove useless ternary in match_str



This block is only run if (!sfx), so checking again is a waste.

Index: Src/Zle/compmatch.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/compmatch.c,v
retrieving revision 1.57
diff -u -r1.57 compmatch.c
--- Src/Zle/compmatch.c	5 Sep 2008 00:18:13 -0000	1.57
+++ Src/Zle/compmatch.c	10 Sep 2008 18:27:14 -0000
@@ -562,7 +562,7 @@
 	    wexact += 1 + bslash;
 	    if (!test)
 		while (bp && bc >= (useqbr ? bp->qpos : bp->pos)) {
-		    bp->curpos = matchbufadded + (sfx ? (ow - w) : (w - ow)) + obc;
+		    bp->curpos = matchbufadded + (w - ow) + obc;
 		    bp = bp->next;
 		}
 	    lm = NULL;



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