From b8c93afd3438f98602bbb7caec4c1c349ef64acb Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 29 Mar 2020 20:45:46 +0000 Subject: [PATCH] driver: Make sure we don't change the return value in a called function. --- zsh-syntax-highlighting.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index f5fb700..73a92c6 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -72,7 +72,7 @@ typeset -ga ZSH_HIGHLIGHT_HIGHLIGHTERS _zsh_highlight() { # Store the previous command return code to restore it whatever happens. - local ret=$? + readonly 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?'.