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

Re: [BUG] queueing_enabled grows infinitely when in .recursive-edit



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



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