zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] queueing_enabled grows infinitely when in .recursive-edit
Date: Mon, 3 Oct 2016 09:33:23 -0700	[thread overview]
Message-ID: <161003093323.ZM8230@torch.brasslantern.com> (raw)
In-Reply-To: <161002162145.ZM22574@torch.brasslantern.com>

On Oct 2,  4:21pm, Bart Schaefer wrote:
}
} The second is that zlecore() expects to be entered with the signal
} queue disabled, but zle widgets are called with queueing enabled, so
} recursiveedit() needs save/zero/restore the queue level around the
} call to zlecore().

Here's the patch for this.  Unchanged from 39543, but reposting because
I explicitly said 39543 was not for commit.


diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 0b3b1fc..09581b5 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -1868,11 +1868,17 @@ int
 recursiveedit(UNUSED(char **args))
 {
     int locerror;
+    int q = queue_signal_level();
+
+    /* zlecore() expects to be entered with signal queue disabled */
+    dont_queue_signals();
 
     redrawhook();
     zrefresh();
     zlecore();
 
+    restore_queue_signals(q);
+
     locerror = errflag ? 1 : 0;
     errflag = done = eofsent = 0;
 

-- 
Barton E. Schaefer


      parent reply	other threads:[~2016-10-03 16:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-02 19:00 Sebastian Gniazdowski
2016-10-02 19:02 ` Sebastian Gniazdowski
2016-10-02 23:21 ` Bart Schaefer
2016-10-03 10:00   ` Sebastian Gniazdowski
2016-10-03 10:18   ` Peter Stephenson
2016-10-03 11:55     ` Sebastian Gniazdowski
2016-10-03 15:49       ` Bart Schaefer
2016-10-03 16:43         ` Sebastian Gniazdowski
2016-10-03 18:11           ` Bart Schaefer
2016-10-05  5:56         ` Sebastian Gniazdowski
2016-10-05  6:03           ` Sebastian Gniazdowski
2016-10-03 15:20     ` Bart Schaefer
2016-10-03 16:07       ` Bart Schaefer
2016-10-03 16:33   ` Bart Schaefer [this message]

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=161003093323.ZM8230@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).