From 4f13bbd6548e683512249aee6b638385e5d8ecd6 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Fri, 11 Aug 2000 12:19:35 +0000 Subject: fixes for completion in math contexts (12592) --- Src/Zle/compcore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Src/Zle/compcore.c') diff --git a/Src/Zle/compcore.c b/Src/Zle/compcore.c index 80f558b5e..e2dbe4909 100644 --- a/Src/Zle/compcore.c +++ b/Src/Zle/compcore.c @@ -664,7 +664,7 @@ callcompfunc(char *s, char *fn) zsfree(compprefix); zsfree(compsuffix); if (unset(COMPLETEINWORD)) { - tmp = multiquote(s, 0); + tmp = (linwhat == IN_MATH ? dupstring(s) : multiquote(s, 0)); untokenize(tmp); compprefix = ztrdup(tmp); compsuffix = ztrdup(""); @@ -675,11 +675,11 @@ callcompfunc(char *s, char *fn) sav = *ss; *ss = '\0'; - tmp = multiquote(s, 0); + tmp = (linwhat == IN_MATH ? dupstring(s) : multiquote(s, 0)); untokenize(tmp); compprefix = ztrdup(tmp); *ss = sav; - ss = multiquote(ss, 0); + ss = (linwhat == IN_MATH ? dupstring(ss) : multiquote(ss, 0)); untokenize(ss); compsuffix = ztrdup(ss); } -- cgit 1.4.1