Parcourir la source

driver: Fix "_zsh_highlight:3: read-only variable: ret" warnings when POSIX_BUILTINS is set.

Fixes #719.

Cf. #688.
pull/720/head
Daniel Shahaf il y a 4 ans
Parent
révision
96eb2e31a1
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. +3
    -1
      zsh-syntax-highlighting.zsh

+ 3
- 1
zsh-syntax-highlighting.zsh Voir le fichier

@ -72,7 +72,9 @@ typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS
_zsh_highlight()
{
# Store the previous command return code to restore it whatever happens.
readonly ret=$?
local ret=$?
# Make it read-only. Can't combine this with the previous line when POSIX_BUILTINS may be set.
typeset -r ret
# Remove all highlighting in isearch, so that only the underlining done by zsh itself remains.
# For details see FAQ entry 'Why does syntax highlighting not work while searching history?'.

Chargement…
Annuler
Enregistrer