zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH 2/2] add-zle-hook-widget: Add a missing arithmetic evaluation to the new index's computation.
Date: Fri, 12 Oct 2018 13:40:37 +0000	[thread overview]
Message-ID: <20181012134037.16689-2-danielsh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20181012134037.16689-1-danielsh@tarpaulin.shahaf.local2>

---
 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

  reply	other threads:[~2018-10-12 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-12 13:40 [PATCH 1/2] add-zle-hook-widget: Support running under NO_UNSET ('set -u') Daniel Shahaf
2018-10-12 13:40 ` Daniel Shahaf [this message]
2018-10-12 13:43   ` [PATCH 2/2] add-zle-hook-widget: Add a missing arithmetic evaluation to the new index's computation Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181012134037.16689-2-danielsh@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).