Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update is-at-least 5.8.0.* calls for the release of zsh-5.8.1 #856

Closed
danielshahaf opened this issue Feb 12, 2022 · 1 comment
Closed

Update is-at-least 5.8.0.* calls for the release of zsh-5.8.1 #856

danielshahaf opened this issue Feb 12, 2022 · 1 comment
Milestone

Comments

@danielshahaf
Copy link
Member

The following two checks:

# The memo= feature was added to zsh in commit zsh-5.8-172-gdd6e702ee.
# The version number at the time was 5.8.0.2-dev (see Config/version.mk).
# Therefore, on 5.8.0.3 and newer the memo= feature is available.
#
# On zsh version 5.8.0.2 between the aforementioned commit and the
# first Config/version.mk bump after it (which, at the time of writing,
# is yet to come), this condition will false negative.
if is-at-least 5.8.0.3 $ZSH_VERSION.0.0; then

# See _zsh_highlight for the magic version number. (The use of 5.8.0.2
# rather than 5.8.0.3 as in the _zsh_highlight is deliberate.)
if is-at-least 5.8.0.2 $ZSH_VERSION.0.0 && _zsh_highlight__function_callable_p add-zle-hook-widget

were written when zsh-5.8 was the current release. zsh-5.8.1 has just been released as zsh-5.8 plus a handful of patches (none of which affect us). Those two conditions should be updated so they return false on zsh-5.8.1.

@danielshahaf danielshahaf added this to the 0.8.0 milestone Feb 12, 2022
@danielshahaf
Copy link
Member Author

If someone runs z-sy-h under zsh-5.8.1 (fairly likely to happen soon, since it's a security release), then both conditions would false positive.


The first condition would cause the memo feature to be used, which would be a problem:

# Reset region_highlight to build it from scratch
if (( zsh_highlight__memo_feature )); then
region_highlight=( "${(@)region_highlight:#*memo=zsh-syntax-highlighting*}" )
else
# Legacy codepath. Not very interoperable with other plugins (issue #418).
region_highlight=()
fi

However, as the comment above the first condition explains, that condition is likely to only be evaluated at all during test suite runs, so this is less of a priority.


The second condition would enable the redrawhook codepath even though the memo feature isn't available. Per the comments above that condition, I assume this would reintroduce #579 and #735 for users of 5.8.1 until we fix this condition again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant