zsh-workers
 help / color / mirror / code / Atom feed
* [BUG] When sched +N ... is called from zle -F handler, it doesn't run
@ 2018-07-28 11:05 ` Sebastian Gniazdowski
  2018-07-30 14:16   ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Gniazdowski @ 2018-07-28 11:05 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
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.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] When sched +N ... is called from zle -F handler, it doesn't run
  2018-07-28 11:05 ` [BUG] When sched +N ... is called from zle -F handler, it doesn't run Sebastian Gniazdowski
@ 2018-07-30 14:16   ` Peter Stephenson
  2018-07-31  8:12     ` Sebastian Gniazdowski
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2018-07-30 14:16 UTC (permalink / raw)
  To: Zsh hackers list

On Sat, 28 Jul 2018 13:05:58 +0200
Sebastian Gniazdowski <sgniazdowski@gmail.com> 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);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [BUG] When sched +N ... is called from zle -F handler, it doesn't run
  2018-07-30 14:16   ` Peter Stephenson
@ 2018-07-31  8:12     ` Sebastian Gniazdowski
  0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Gniazdowski @ 2018-07-31  8:12 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

On 30 July 2018 at 16:16, Peter Stephenson <p.stephenson@samsung.com> wrote:
> +           /* If looping, need to recalculate timeout */
> +           calc_timeout(&tmout, do_keytmout);

Cool, I've checked, it works.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-07-31  8:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180728110652epcas5p3b6e47f2e0e59c60aa46a2a8cb42a5c3d@epcas5p3.samsung.com>
2018-07-28 11:05 ` [BUG] When sched +N ... is called from zle -F handler, it doesn't run Sebastian Gniazdowski
2018-07-30 14:16   ` Peter Stephenson
2018-07-31  8:12     ` Sebastian Gniazdowski

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).