Skip to content

Commit 3944a44

Browse files
committed
driver: Fix a version number check to work around a bug in the zsh version whereunder the check should return false.
The bug is as follows: % zsh-5.8 -fc 'autoload is-at-least; is-at-least 5.8.0.2 && echo yes || echo no' yes % zsh-5.8 -fc 'autoload is-at-least; is-at-least 5.8.0.2 $ZSH_VERSION && echo yes || echo no' yes This commit deploys the following workaround: % zsh-5.8 -fc 'autoload is-at-least; is-at-least 5.8.0.2 $ZSH_VERSION.0.0 && echo yes || echo no' no Fixes #756.
1 parent 34674d7 commit 3944a44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zsh-syntax-highlighting.zsh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ _zsh_highlight()
163163
# On zsh version 5.8.0.2 between the aforementioned commit and the
164164
# first Config/version.mk bump after it (which, at the time of writing,
165165
# is yet to come), this condition will false negative.
166-
if is-at-least 5.8.0.3; then
166+
if is-at-least 5.8.0.3 $ZSH_VERSION.0.0; then
167167
integer -gr zsh_highlight__memo_feature=1
168168
else
169169
integer -gr zsh_highlight__memo_feature=0
@@ -414,7 +414,7 @@ _zsh_highlight_call_widget()
414414
#
415415
# See _zsh_highlight for the magic version number. (The use of 5.8.0.2
416416
# rather than 5.8.0.3 as in the _zsh_highlight is deliberate.)
417-
if is-at-least 5.8.0.2 && _zsh_highlight__function_callable_p add-zle-hook-widget
417+
if is-at-least 5.8.0.2 $ZSH_VERSION.0.0 && _zsh_highlight__function_callable_p add-zle-hook-widget
418418
then
419419
autoload -U add-zle-hook-widget
420420
_zsh_highlight__zle-line-finish() {

0 commit comments

Comments
 (0)