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

Re: PATCH: isearch match highlighting



On Apr 26,  8:27pm, Matt Wozniski wrote:
} Subject: Re: PATCH: isearch match highlighting
}
} On Sat, Apr 26, 2008 at 6:48 PM, Peter Stephenson wrote:
} >  I can't help feeling I must have screwed up this one somehow.
} 
} 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.  Anybody else see this?

I can reproduce this.  It's looping in

#0  0x0020fbed in memset () from /lib/tls/libc.so.6
#1  0xbfee0bb0 in ?? ()
#2  0x080c03d0 in mb_metacharlenconv_r (s=0x9783eda "", wcp=0xbfee07d0, 
    mbsp=0xbfee07b8) at ../../zsh-4.0/Src/utils.c:4008
#3  0x08116720 in doisearch (args=0x8169a1c, dir=-1, pattern=0)
    at ../../../zsh-4.0/Src/Zle/zle_hist.c:1408

mb_metacharlenconv_r() is returning 0 on the empty string (which a
comment in utils.c says "probably shouldn't happen") so charpos is
never incremented at line 1412 and the loop at line 1407 never stops.

I think this means end_pos is wrong but I don't have time to try to
chase that back through set_isearch_spot() right now, so we'll have
to wait for PWS.

Note that what's broken is the old history-incremental-search-backward.
Everything works fine with history-incremental-pattern-search-backward.



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