mirror of
https://github.com/zsh-users/zsh-syntax-highlighting
synced 2024-12-21 19:00:10 +00:00
driver: Use stable zsh release in is-at-least calls
This commit is contained in:
parent
bb27265aee
commit
9bb3db7fd2
@ -155,18 +155,7 @@ _zsh_highlight()
|
||||
# C structs, so that none of the previous case patterns will match.
|
||||
#
|
||||
# In either case, fall back to a version check.
|
||||
#
|
||||
# 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 zsh master 5.8.0.3 and newer the memo= feature is available.
|
||||
# However, there's also the zsh 5.8.1 release, which doesn't have the
|
||||
# memo= feature.
|
||||
#
|
||||
# On zsh master 5.8.0.2 between the aforementioned commit and the
|
||||
# first Config/version.mk bump after it (zsh-5.8-607-g75c1edde5, the
|
||||
# bump to 5.8.1.1-dev following the backport to master of the bump
|
||||
# to 5.8.1), this condition will false negative.
|
||||
if is-at-least 5.8.1.1 $ZSH_VERSION.0.0; then
|
||||
if is-at-least 5.9; then
|
||||
integer -gr zsh_highlight__memo_feature=1
|
||||
else
|
||||
integer -gr zsh_highlight__memo_feature=0
|
||||
@ -415,9 +404,7 @@ _zsh_highlight_call_widget()
|
||||
# We check this with a plain version number check, since a functional check,
|
||||
# as done by _zsh_highlight, can only be done from inside a widget
|
||||
# function — a catch-22.
|
||||
#
|
||||
# See _zsh_highlight for the magic version number.
|
||||
if is-at-least 5.8.1.1 $ZSH_VERSION.0.0 && _zsh_highlight__function_callable_p add-zle-hook-widget
|
||||
if is-at-least 5.9 && _zsh_highlight__function_callable_p add-zle-hook-widget
|
||||
then
|
||||
autoload -U add-zle-hook-widget
|
||||
_zsh_highlight__zle-line-finish() {
|
||||
|
Loading…
Reference in New Issue
Block a user