Open doy opened 3 years ago
Hi, I think that this is a similar bug to #241. See https://github.com/zsh-users/zsh-autosuggestions/issues/241#issuecomment-375812886 and https://github.com/zsh-users/zsh-autosuggestions/pull/319
Try adding those widgets to your ZSH_AUTOSUGGEST_CLEAR_WIDGETS
via something like this in your zshrc:
ZSH_AUTOSUGGEST_CLEAR_WIDGETS+=(history-beginning-search-backward-end history-beginning-search-forward-end)
We can leave this issue open until we update the default value of ZSH_AUTOSUGGEST_CLEAR_WIDGETS
to include these widgets as well.
Describe the bug
async mode was recently enabled by default, and when used,
history-search-end
doesn't work properly. the exact way it fails is a bit inconsistent - it feels like there is a race condition or something. most commonly you need to press the key it is bound to multiple times to get it to do anything, and eventually it stops searching through history at all.To Reproduce
Steps to reproduce the behavior:
if you populate your history with a few commands that share a prefix, you should see it working properly if you uncomment the
unset
line, but break if you comment it out. for instance, run these commands in sequence:and then at the prompt, type
echo
and press the up arrow key a couple times. this should cycle throughecho quux
,echo baz
,echo bar
,echo foo
on each keypress, but if async mode is enabled, i getecho quux
from the first up arrow press, thenecho baz
, then it stays onecho baz
, and going further back through the history requires multiple up arrow presses. eventually if there are enough entries, something else happens where it stops searching any further backward at all.Expected behavior
the
history-search-end
widget should work the same way in async mode as it does with async mode disabledDesktop