about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-11 12:19:35 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-08-11 12:19:35 +0000
commit4f13bbd6548e683512249aee6b638385e5d8ecd6 (patch)
treebb0a8de3d3768205fd607b4771614d320bdabbb2 /Src
parent1fbdfe14e776d07ba0e928bf274bfaa660b853e3 (diff)
downloadzsh-4f13bbd6548e683512249aee6b638385e5d8ecd6.tar.gz
zsh-4f13bbd6548e683512249aee6b638385e5d8ecd6.tar.xz
zsh-4f13bbd6548e683512249aee6b638385e5d8ecd6.zip
fixes for completion in math contexts (12592)
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/compcore.c6
-rw-r--r--Src/Zle/zle_tricky.c1
2 files changed, 4 insertions, 3 deletions
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);
 	}
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index e081b40a1..63978175d 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -1311,6 +1311,7 @@ get_comp_string(void)
 	    } else
 		insubscr = 1;
 	}
+	parse_subst_string(s);
     }
     /* This variable will hold the current word in quoted form. */
     qword = ztrdup(s);