zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: Set completion function flags correctly for zle -P
Date: Mon, 31 Aug 2015 11:55:58 +0200	[thread overview]
Message-ID: <1441014958-27075-1-git-send-email-mikachu@gmail.com> (raw)
In-Reply-To: <1441007642-12365-1-git-send-email-mikachu@gmail.com>

---

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


  parent reply	other threads:[~2015-08-31  9:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30 21:59 Overriding a yank* widget in zle Wayne Davison
2010-12-31  6:39 ` Wayne Davison
2010-12-31  8:28 ` Bart Schaefer
2010-12-31 23:23   ` Wayne Davison
2015-08-31  7:54   ` PATCH: Implement zle -P Mikael Magnusson
2015-08-31  7:56     ` Mikael Magnusson
2015-08-31  9:55     ` Mikael Magnusson [this message]
2015-08-31 10:17       ` PATCH: Set completion function flags correctly for " Mikael Magnusson
2015-08-31 17:11     ` PATCH: Implement " Peter Stephenson
2015-09-01  6:23       ` Bart Schaefer
2015-09-01  6:50         ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441014958-27075-1-git-send-email-mikachu@gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).