From 3013e98ca4f5bb8d9365c31dc09ea0f625e7733e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 8 Jan 2002 15:33:23 +0000 Subject: fix completion after var+= to use value context (16418) --- Src/Zle/zle_tricky.c | 2 ++ Src/lex.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c index ca1a50ce1..6ecfaa885 100644 --- a/Src/Zle/zle_tricky.c +++ b/Src/Zle/zle_tricky.c @@ -1215,6 +1215,8 @@ get_comp_string(void) zsfree(varname); varname = ztrdup(tt); *s = sav; + if (*s == '+') + s++; if (skipparens(Inbrack, Outbrack, &s) > 0 || s > tt + cs - wb) { s = NULL; inwhat = IN_MATH; diff --git a/Src/lex.c b/Src/lex.c index 11404a646..cb76bc7ab 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -1140,7 +1140,8 @@ gettokstr(int c, int sub) skipparens(Inbrack, Outbrack, &t); } } - if (*t == '+') t++; + if (*t == '+') + t++; if (t == bptr) { e = hgetc(); if (e == '(' && incmdpos) { -- cgit 1.4.1