summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Src/Zle/zle_hist.c6
2 files changed, 11 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 304e17493..f5e6d279e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-13  Peter Stephenson  <pws@csr.com>
+
+	* users/13903: Src/Zle/zle_hist.c: repeated vi searching was
+	broken and "_" prompt was missing.
+
 2009-03-13  Geoff Wing  <gcw@zsh.org>
 
 	* unposted: LICENCE: update year to 2009
@@ -11374,5 +11379,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.4609 $                         
+* $Revision: 1.4610 $                         
 *****************************************************
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index aec847ec6..532787bfa 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -1742,7 +1742,7 @@ getvisrchstr(void)
     selectkeymap("main", 1);
     while (sptr) {
 	sbuf[sptr] = '_';
-	sbuf[sptr] = '\0';
+	sbuf[sptr+1] = '\0';
 	zrefresh();
 	if (!(cmd = getkeycmd()) || cmd == Th(z_sendbreak)) {
 	    ret = 0;
@@ -1760,6 +1760,10 @@ getvisrchstr(void)
 	    	cmd == Th(z_vicmdmode)) {
 	    sbuf[sptr] = ZWC('\0');
 	    visrchstr = ztrdup(sbuf+1);
+	    if (!strlen(visrchstr)) {
+	        zsfree(visrchstr);
+		visrchstr = ztrdup(vipenultsrchstr);
+	    }
 	    ret = 1;
 	    sptr = 0;
 	} else if(cmd == Th(z_backwarddeletechar) ||