diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/compcore.c | 6 | ||||
-rw-r--r-- | Src/Zle/zle_tricky.c | 1 |
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); |