about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2015-07-25 21:50:55 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2015-07-25 21:50:55 +0100
commitb3aa3b77916007703b341bfd30c3647bdc355bc8 (patch)
treefef4548806c197d096bb99d10441d5ac5fe69a0e /Src
parentdd8079e0415cf213d9bb5d41d1ad95c04b774f3a (diff)
downloadzsh-b3aa3b77916007703b341bfd30c3647bdc355bc8.tar.gz
zsh-b3aa3b77916007703b341bfd30c3647bdc355bc8.tar.xz
zsh-b3aa3b77916007703b341bfd30c3647bdc355bc8.zip
35910: Don't add to raw lex buffer if lex stopped.
This was causing a segmentation violation in completion when parsing
an incomplete math expression, e.g. 'echo $((3*4)<TAB>'.
Diffstat (limited to 'Src')
-rw-r--r--Src/input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/input.c b/Src/input.c
index 613f89a25..1efabadeb 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -222,7 +222,8 @@ ingetc(void)
 	if (inputline())
 	    break;
     }
-    zshlex_raw_add(lastc);
+    if (!lexstop)
+	zshlex_raw_add(lastc);
     return lastc;
 }