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

PATCH: dead code in getvisrchstr



This is in a while(sptr) loop.

Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.58
diff -u -r1.58 zle_hist.c
--- Src/Zle/zle_hist.c	18 Sep 2008 20:35:40 -0000	1.58
+++ Src/Zle/zle_hist.c	30 Oct 2008 01:41:40 -0000
@@ -1748,12 +1748,8 @@
 	    clearscreen(zlenoargs);
 	} else if(cmd == Th(z_acceptline) ||
 	    	cmd == Th(z_vicmdmode)) {
-	    if (sptr) {
-		sbuf[sptr] = ZWC('\0');
-		visrchstr = ztrdup(sbuf+1);
-	    } else {
-		visrchstr = ztrdup(vipenultsrchstr);
-	    }
+	    sbuf[sptr] = ZWC('\0');
+	    visrchstr = ztrdup(sbuf+1);
 	    ret = 1;
 	    sptr = 0;
 	} else if(cmd == Th(z_backwarddeletechar) ||



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