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

Re: 4.3.0-dev-2 BUG: negative cursor position



On Mon, Dec 12, 2005 at 11:14:05PM +0900, Jun T. wrote:
> Is this the right place to report a zsh bug?

Yes, this is a very good place for that.

> With gdb, I found that zlecs becomes negative at line 674 of zle_hist.c.

Good catch -- that code is new for 4.3.x: it's a slightly optimized
version of some setline() code, but the check to see if zlecs was non-
zero was accidentally dropped from the algorithm.  I've checked in a
fix.  Note that your suggested fix will work just fine, but I ended up
using a slightly different check (taken from setline()) where it just
checks zlecs against 0 instead of calling findbol().

Thanks for the report,

..wayne..



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