about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/Zle/zle_hist.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9836db6b0..90e3565b2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-10-30  Clint Adams  <clint@zsh.org>
+
+	* 25949: Src/Zle/zle_hist.c: remove dead code in getvisrchstr.
+
 2008-10-29  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
 	* 25945: Completion/Unix/Type/_path_files: need some extra
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index 97b82fdcd..c4dad7617 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1748,12 +1748,8 @@ getvisrchstr(void)
 	    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) ||