about summary refs log tree commit diff
path: root/Src/Zle/zle_tricky.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/Zle/zle_tricky.c')
-rw-r--r--Src/Zle/zle_tricky.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Src/Zle/zle_tricky.c b/Src/Zle/zle_tricky.c
index 7476b833b..e97bd1f6d 100644
--- a/Src/Zle/zle_tricky.c
+++ b/Src/Zle/zle_tricky.c
@@ -145,6 +145,11 @@ mod_export char **cfargs;
 /**/
 mod_export int cfret;
 
+/* != 0 if recursive calls to completion are (temporarily) allowed */
+
+/**/
+mod_export int comprecursive;
+
 /* Find out if we have to insert a tab (instead of trying to complete). */
 
 /**/
@@ -540,11 +545,12 @@ docomplete(int lst)
     char *s, *ol;
     int olst = lst, chl = 0, ne = noerrs, ocs, ret = 0, dat[2];
 
-    if (active) {
+    if (active && !comprecursive) {
 	zwarn("completion cannot be used recursively (yet)", NULL, 0);
 	return 1;
     }
     active = 1;
+    comprecursive = 0;
     if (undoing)
 	setlastline();