zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [BUG] When sched +N ... is called from zle -F handler, it doesn't run
Date: Mon, 30 Jul 2018 15:16:14 +0100	[thread overview]
Message-ID: <20180730141616eucas1p1f95840c0f3a96a5fee54e73e1bf1d62b~GKyitazWH0049800498eucas1p1l@eucas1p1.samsung.com> (raw)
In-Reply-To: <CAKc7PVC8C=MOdHnwmEa4zich8TyO-VwDGZRvD0enw2W8h9uppA@mail.gmail.com>

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


  reply	other threads:[~2018-07-30 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180728110652epcas5p3b6e47f2e0e59c60aa46a2a8cb42a5c3d@epcas5p3.samsung.com>
2018-07-28 11:05 ` Sebastian Gniazdowski
2018-07-30 14:16   ` Peter Stephenson [this message]
2018-07-31  8:12     ` Sebastian Gniazdowski

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='20180730141616eucas1p1f95840c0f3a96a5fee54e73e1bf1d62b~GKyitazWH0049800498eucas1p1l@eucas1p1.samsung.com' \
    --to=p.stephenson@samsung.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).