about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorPeter Stephenson <p.w.stephenson@ntlworld.com>2015-07-25 20:22:23 +0100
committerPeter Stephenson <p.w.stephenson@ntlworld.com>2015-07-25 20:22:23 +0100
commit771381c2ce0587d825528d49244006edf770fd47 (patch)
tree6079ff2dba0e0adc829a39eb0320d1c6c712cd0b /Src
parentf3130bf6e9d5fa3ecda845f1895b9b55a240064c (diff)
downloadzsh-771381c2ce0587d825528d49244006edf770fd47.tar.gz
zsh-771381c2ce0587d825528d49244006edf770fd47.tar.xz
zsh-771381c2ce0587d825528d49244006edf770fd47.zip
35908: fix $((...)) completion in expand-or-complete widget
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_tricky.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 2104ca198..3bf8d4572 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -721,11 +721,12 @@ docomplete(int lst)
 		    }
 		}
 	    }
-	    if (lst == COMP_EXPAND_COMPLETE)
+	    if (lst == COMP_EXPAND_COMPLETE) {
 		do {
 		    /* Check if there is a parameter expression. */
 		    for (; *q && *q != String; q++);
-		    if (*q == String && q[1] != Inpar && q[1] != Inbrack) {
+		    if (*q == String && q[1] != Inpar && q[1] != Inparmath &&
+			q[1] != Inbrack) {
 			if (*++q == Inbrace) {
 			    if (! skipparens(Inbrace, Outbrace, &q) &&
 				q == s + zlemetacs - wb)
@@ -769,6 +770,7 @@ docomplete(int lst)
 		    } else
 			break;
 		} while (q < s + zlemetacs - wb);
+	    }
 	    if (lst == COMP_EXPAND_COMPLETE) {
 		/* If it is still not clear if we should use expansion or   *
 		 * completion and there is a `$' or a backtick in the word, *