Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Set completion function flags correctly for zle -P



---

This appears to work better.

 Src/Zle/zle_thingy.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Src/Zle/zle_thingy.c b/Src/Zle/zle_thingy.c
index e648838..0401099 100644
--- a/Src/Zle/zle_thingy.c
+++ b/Src/Zle/zle_thingy.c
@@ -606,9 +606,10 @@ bin_zle_prototype(char *name, char **args, UNUSED(Options ops), UNUSED(char func
 	return 1;
     }
     w = zalloc(sizeof(*w));
-    w->flags = pw->flags & ~WIDGET_INT;
+    w->flags = pw->flags & ~(WIDGET_INT|ZLE_ISCOMP);
     w->first = NULL;
-    if (w->flags & WIDGET_NCOMP) {
+    if (pw->flags & ZLE_ISCOMP) {
+	w->flags |= WIDGET_NCOMP;
 	w->u.comp.fn = pw->u.fn;
 	w->u.comp.wid = ztrdup(args[1]);
 	w->u.comp.func = ztrdup(args[2]);
-- 
2.5.0



Messages sorted by: Reverse Date, Date, Thread, Author