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

Re: PATCH: isearch match highlighting



"Matt Wozniski" wrote:
> zsh -f
> bindkey -e
> ^Rb
> and the shell goes into a tight loop, using 100% of one of my cores,
> and won't die to anything less than a kill -9.

Oops.  pos wasn't yet updated.

Index: Src/Zle/zle_hist.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
retrieving revision 1.49
diff -u -r1.49 zle_hist.c
--- Src/Zle/zle_hist.c	26 Apr 2008 22:52:51 -0000	1.49
+++ Src/Zle/zle_hist.c	27 Apr 2008 19:57:27 -0000
@@ -1323,7 +1323,7 @@
 			} else
 			    t = zlinefind(zt, pos, sbuf, dir, sens);
 			if (t)
-			    end_pos = pos + sbptr - (sbuf[0] == '^');
+			    end_pos = (t - zt) + sbptr - (sbuf[0] == '^');
 		    }
 		}
 		if (t) {


-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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