about summary refs log tree commit diff
path: root/Src/lex.c
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2016-09-07 18:51:01 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2016-09-07 18:51:01 +0100
commitef862262e72c51621aa4d9400a2395fdc4f2324f (patch)
tree472699c2eb2e78e6e96899628243ee006d1135eb /Src/lex.c
parentc001d1f2a2eb7c3ddea1c1f09ca6660070befaa3 (diff)
downloadzsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.gz
zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.xz
zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.zip
39185: Only set word begin for completion word if not alias.
This is consistent with other ZLE code in lex.c and fixes a crash
in some completions involving aliases, e.g. if uncompleted quotes.
Diffstat (limited to 'Src/lex.c')
-rw-r--r--Src/lex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/lex.c b/Src/lex.c
index 6b20e14b5..e0935bf05 100644
--- a/Src/lex.c
+++ b/Src/lex.c
@@ -613,7 +613,7 @@ gettok(void)
     if (lexstop)
 	return (errflag) ? LEXERR : ENDINPUT;
     isfirstln = 0;
-    if ((lexflags & LEXFLAGS_ZLE))
+    if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS))
 	wordbeg = inbufct - (qbang && c == bangchar);
     hwbegin(-1-(qbang && c == bangchar));
     /* word includes the last character read and possibly \ before ! */