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

Re: zsh 4.3.10 history-incremental-search-backward freezes in UTF-8



On 2010-03-18 15:44:24 +0000, Peter Stephenson wrote:
> Index: Src/Zle/zle_hist.c
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Src/Zle/zle_hist.c,v
> retrieving revision 1.63
> diff -p -u -r1.63 zle_hist.c
> --- Src/Zle/zle_hist.c	6 Sep 2009 21:37:14 -0000	1.63
> +++ Src/Zle/zle_hist.c	18 Mar 2010 15:42:53 -0000
> @@ -1454,6 +1454,8 @@ doisearch(char **args, int dir, int patt
>  	    memset(&mbs, 0, sizeof(mbs));
>  	    while (charpos < end_pos) {
>  		ret = mb_metacharlenconv_r(zlemetaline + charpos, &wc, &mbs);
> +		if (ret <= 0) /* Unrecognised, treat as single char */
> +		    ret = 1;
>  		if (charpos <= pos && pos < charpos + ret)
>  		    isearch_startpos = charcount;
>  		charcount++;

Since I've recompiled zsh to use this patch, zsh crashes more and
more often under Mac OS X (under ISO-8859-1 locales). I'll try the
new one...

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



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