There is a known issue in ZSH, specifically versions up to and including 5.3.1, where a static pattern buffer is used in the history isearch. However, the assumptions that led to this code forget that ZLE hooks may call other pattern functions as well, breaking functionality. As an example, this issue breaks certain uses of zsh-syntax-highlighting (https://github.com/zsh-users/zsh-syntax-highlighting/issues/407) A backported fix has been applied by both Arch Linux (https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/zsh&id=0e7db42263c914ae4c7b3c74df1e6c756c94fe8b) and Debian Stretch (https://anonscm.debian.org/cgit/collab-maint/zsh.git/diff/debian/patches/cherry-pick_48cadf48_be_more_careful_with_pattern_allocation_in_history_isearch.patch?id=348c47bdc3b6a92558d82086d168e7829437388a) Both of these come from the original patch shown here: http://www.zsh.org/mla/workers/2017/msg00034.html / https://github.com/zsh-users/zsh/commit/48cadf48ff9c61ce09e826ad9a58e250e999a262 I am hoping that Fedora would also be willing to provide the same backported fix. Version-Release number of selected component (if applicable): zsh-5.3.1-5.fc26-x86_64 Steps to Reproduce: % bindkey '^R' history-incremental-pattern-search-backward % evil_hook() { a=(); : ${a[(r)foo*]}; }; % zle -N zle-isearch-update evil_hook % echo "foo" % echo "bar" % echo "baz" type: <^R>b % echo "baz" bck-i-search: b_ type: <^R> % echo "foo" bck-i-search: b_ 'foo' is found instead of 'bar' because evil_hook modified the static pattern used in isearch.
> specifically versions up to and including 5.3.1 I missed a word. Specifically 5.3.x versions up to and including 5.3.1. There is no indication of a similar bug in the 5.2 releases (such as those available on fc25).
Thanks for the report! I will backport the fix from upstream.
zsh-5.3.1-6.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-559b37e4fb
Appreciated! Looks like the fix has worked to me, but right now POSTs to Bodhi seem to be timing out. I'll try again later to get that sweet karma up.
zsh-5.3.1-6.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-559b37e4fb
Perfect. Thank you for testing the update!
zsh-5.3.1-6.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.