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

Bug in history-beginning-search-* in 4.2.0



Starting with:

schaefer<504> eval echo this is a test line
this is a test line
schaefer<505> echo this is a second test line
this is a second test line

I now invoke predict-on and type e v backspace:

schaefer<506> echo this is a second test line
schaefer<506> eval echo this is a test line
schaefer<506> evcho this is a second test line

Note that history-beginning-search-forward worked correctly, but the
new text it inserted failed to overwrite the "v".  For some reason the
((--CURSOR)) in delete-backward-and-predict didn't stick.

This appears to be a bug in history-beginning-search-*.  Given this
simple widget:

    back-and-search-forward () {
        ((--CURSOR))
        zle .history-beginning-search-forward
    }

I can reproduce the above bug with history-beginning-search-backward
followed by back-and-search-forward.



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