about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-02-16 17:16:57 +0000
committerPeter Stephenson <pws@zsh.org>2015-02-16 17:16:57 +0000
commit126fb61c7c48edb19b9d771e4e517cef710f8bf1 (patch)
treeaedae1b813cb2910a9b62b6a28d0b30268a6c3ff /Src/lex.c
parent041a85243eb6d32e1cd1dc9f11a510c79e151433 (diff)
downloadzsh-126fb61c7c48edb19b9d771e4e517cef710f8bf1.tar.gz
zsh-126fb61c7c48edb19b9d771e4e517cef710f8bf1.tar.xz
zsh-126fb61c7c48edb19b9d771e4e517cef710f8bf1.zip
34560: Fix $(( that's actually a multiline cmd subst.
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 91628d4c2..006848543 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -483,9 +483,13 @@ cmd_or_math(int cs_type)
 {
     int oldlen = lexbuf.len;
     int c;
+    int oinflags = inbufflags;
 
     cmdpush(cs_type);
+    inbufflags |= INP_APPEND;
     c = dquote_parse(')', 0);
+    if (!(oinflags & INP_APPEND))
+	inbufflags &= ~INP_APPEND;
     cmdpop();
     *lexbuf.ptr = '\0';
     if (!c) {