zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: remove useless ternary in match_str
@ 2008-09-10 18:30 Clint Adams
  0 siblings, 0 replies; only message in thread
From: Clint Adams @ 2008-09-10 18:30 UTC (permalink / raw)
  To: zsh-workers

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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-10 18:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10 18:30 PATCH: remove useless ternary in match_str Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).