summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2017-05-02 09:39:53 +0100
committerPeter Stephenson <pws@zsh.org>2017-05-02 09:39:53 +0100
commitab6f30350a674057b364da1bd1eb4cd70073d89d (patch)
tree71fbc923d5c4e10debbbebd958f09f069dcf8fb6
parented4e37e45c2f5761981cdc6027a5d6abc753176a (diff)
downloadzsh-ab6f30350a674057b364da1bd1eb4cd70073d89d.tar.gz
zsh-ab6f30350a674057b364da1bd1eb4cd70073d89d.zip
unposted: Use typeset -g in insert-unicode-char
Avoid warning from WARN_NESTED_VAR if set.
-rw-r--r--ChangeLog5
-rw-r--r--Functions/Zle/insert-unicode-char4
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index d434649bb..4ad8f44df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-02 Peter Stephenson <p.stephenson@samsung.com>
+
+ * unposted: Functions/Zle/insert-unicode-char: use typeset -g to
+ avoid warnnestedvar warning.
+
2017-04-28 Peter Stephenson <p.stephenson@samsung.com>
* 41020: Src/exec.c, Test/A01grammar.ztst: "command -p" was
diff --git a/Functions/Zle/insert-unicode-char b/Functions/Zle/insert-unicode-char
index af9aad914..b943fb7f7 100644
--- a/Functions/Zle/insert-unicode-char
+++ b/Functions/Zle/insert-unicode-char
@@ -12,11 +12,11 @@ then
local -i 16 -Z 10 arg=$NUMERIC
# ...and use print to turn this into a Unicode character.
LBUFFER+="$(print -n "\U${arg##0x}")"
- _insert_unicode_ready=0
+ integer -g _insert_unicode_ready=0
else
# Set the base to 16...
zle argument-base 16
# ...wait for user to type hex keys then call this widget again.
zle universal-argument
- _insert_unicode_ready=1
+ integer -g _insert_unicode_ready=1
fi