From ef862262e72c51621aa4d9400a2395fdc4f2324f Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 7 Sep 2016 18:51:01 +0100 Subject: 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. --- Src/lex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Src') 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 ! */ -- cgit 1.4.1