Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 2/2] add-zle-hook-widget: Add a missing arithmetic evaluation to the new index's computation.



---
 Functions/Misc/add-zle-hook-widget | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Functions/Misc/add-zle-hook-widget b/Functions/Misc/add-zle-hook-widget
index 9cc35496f..121cf0349 100644
--- a/Functions/Misc/add-zle-hook-widget
+++ b/Functions/Misc/add-zle-hook-widget
@@ -152,7 +152,7 @@ function add-zle-hook-widget {
 	if [[ -z ${(M)extant_hooks[@]:#(<->:|)$fn} ]]; then
        	    # no index and not already hooked
             # assign largest existing index plus 1
-	    i=${${(On@)${(@M)extant_hooks[@]#<->:}%:}[i]:-0}+1
+	    (( i = ${${(On@)${(@M)extant_hooks[@]#<->:}%:}[i]:-0} + 1 ))
 	else
 	    return 0
 	fi



Messages sorted by: Reverse Date, Date, Thread, Author