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

4.3.0-dev-2 BUG: negative cursor position



Hi zsh-workers,

Is this the right place to report a zsh bug?

I tried 4.3.0-dev-2 with --enable-zsh-debug.

old-zsh% /usr/local/bin/zsh -f
new-zsh% bindkey -v
new-zsh% <ESC>kj

Here, <ESC> is to go into the vi-command mode.
Then I hit 'k' to go up in history stack; it worked as expected.
Then I hit 'j' to go down in the stack, but I get the following message:

BUG: negative cursor position

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

    if (invicmdmode())

by

    if (zlecs > findbol() && invicmdmode())

"apparently" fixed the problems but I know NOTHING about the zsh source code.



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