about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--Src/Zle/zle_main.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a68dfaf59..81d31c969 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-03  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 39547: Src/Zle/zle_main.c: handle zero delta in calc_timeout()
+
 2016-10-03  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* 39545: Src/builtin.c, Src/exec.c, Src/hist.c, Src/init.c,
diff --git a/Src/Zle/zle_main.c b/Src/Zle/zle_main.c
index 0b3b1fcf4..4b47d6072 100644
--- a/Src/Zle/zle_main.c
+++ b/Src/Zle/zle_main.c
@@ -471,7 +471,7 @@ calc_timeout(struct ztmout *tmoutp, long do_keytmout)
 
 	    tfdat = (Timedfn)getdata(tfnode);
 	    diff = tfdat->when - time(NULL);
-	    if (diff < 0) {
+	    if (diff <= 0) {
 		/* Already due; call it and rescan. */
 		tfdat->func();
 		continue;