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

Re: [BUG] When sched +N ... is called from zle -F handler, it doesn't run



On Sat, 28 Jul 2018 13:05:58 +0200
Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> I've had to move "sched +1 a-function" call away from inside of a zle
> -F handler (into a precmd handler) because that sched event wasn't
> running after the 1 second, nor after any more time. A key press (of
> e.g. space) was a thing that was restoring correct sched functioning.

diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 99e44a7..7ec8afe 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -804,6 +804,8 @@ raw_getbyte(long do_keytmout, char *cptr)
 		}
 # endif
 	    }
+	    /* If looping, need to recalculate timeout */
+	    calc_timeout(&tmout, do_keytmout);
 	}
 # ifdef HAVE_POLL
 	zfree(fds, sizeof(struct pollfd) * nfds);



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