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

Re: isearch forward broken



Bart Schaefer wrote:
> On Mar 18,  4:45pm, Peter Stephenson wrote:
> } Subject: Re: isearch forward broken
> }
> } I'm up to date and I can't get either of these.  Failing forward
> } i-search when starting a shell with zsh -f isn't surprising, so I
> } presume there's more I don't know about.
> 
> The point is that forward i-search won't search the current buffer
> any more.

Yes, looking for the right problem makes it easier.  I messed up
remember_edits().

Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.22
diff -u -r1.22 zle_hist.c
--- Src/Zle/zle_hist.c	25 Feb 2005 15:10:01 -0000	1.22
+++ Src/Zle/zle_hist.c	18 Mar 2005 18:19:27 -0000
@@ -107,7 +107,9 @@
 	    ZS_memcmp(ent->zle_text, zleline, zlell) != 0) {
 	    if (ent->zle_text)
 		free(ent->zle_text);
-	    ent->zle_text = stringaszleline(ent->text, &ent->zle_len, NULL);
+	    ent->zle_text = zalloc(zlell * ZLE_CHAR_SIZE);
+	    ent->zle_len = zlell;
+	    ZS_memcpy(ent->zle_text, zleline, zlell);
 	}
     }
 }

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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