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

Re: zsh v 2.6-beta13 bug (fwd)



>In viswapmode(), cs was being set to -1 (cs should always be >= 0)

I already fixed that and sent a patch to the list.

>                                                                     should 
>probably put a sanity check for this in zle_refresh.c but it may obscure
>other bugs.

Don't.  The unusual cursor position is a useful clue that something's
broken -- that the cursor has somehow got outside the buffer.  That's
how I found the ~-on-an-empty-line bug: on my Linux box I occasionally
accidentally hit a function key that sent a sequence ^[13~ (not sure of
the number).

On second thoughts, you could put in a sanity check and still have the
current bug highlighting by adding an error message output as well as
putting the cursor within the buffer.  But this would take more extra
code than is likely worthwhile for a `can't happen' condition.

>:Additionally, on HP, after doing that, I can sometimes crash zsh, if I do:
>:1. '~' (as described above)
>:2. 'j' 'k' 'j' 'k'... (until there's a beep)

With the cursor off the end of the buffer, there's undefined behaviour
of a particularly undefined variety.  I'm not surprised it crashes.

-zefram




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