Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] queueing_enabled grows infinitely when in .recursive-edit
- X-seq: zsh-workers 39546
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: [BUG] queueing_enabled grows infinitely when in .recursive-edit
- Date: Mon, 3 Oct 2016 13:55:31 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=nkWPwx3tzgkJ6IHzCP6uLWUbnu8ENpveJdazZo4kxMo=; b=xfG5wGd7c/VwPN+kLgqGiHOzbjxeFjoobWXjQ0O7v4IxxVxAeUnJZlAGKKzH0pCDYf hxpZ8yRk8YyEm9hGg4jmCzWJSVYIdDuwV1sB9w27rNFMb+Y3FjykQyTegNK+I7iJEVYb REAEX2+ZGCa76OcK9mWG8lz/115J/o2U8IGIU2n5bqSr7RIzXSRL2A/ZH3Y8trueTI/R EqQ/gIQbS9OuvXDmFH1Hbeu6K3oqSPISnKTFhSqxmI7udrM/iD9dWS5kO858PmWY2Q6N d5dtplducJPIvrkeLbCfWrVgvMa+JIa2XKf/KmYB4sjST+iO53Qk1wt6dWpSrJe3e4rM Ee8g==
- In-reply-to: <20161003111840.3e5081f0@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVAoLMj+dwEugbvggrmcjQbLP3GutxiNHPbpwvLw-a9F=w@mail.gmail.com> <CGME20161002233734eucas1p1136e84f7a57eaf467c44d8d7446856df@eucas1p1.samsung.com> <161002162145.ZM22574@torch.brasslantern.com> <20161003111840.3e5081f0@pwslap01u.europe.root.pri>
Thanks for the patch I've devoted much time to this. I've tested the
patch and it works. Noted one thing. Initial calc_timeout() in
raw_getbyte() can return with ZTM_NONE while there are scheduled
functions, often after Ctrl-C in .recursive-edit. Added debug prints:
} else if (diff > 0) {
exp100ths = diff * 100;
if (tmoutp->tp != ZTM_KEY ||
exp100ths < tmoutp->exp100ths) {
tmoutp->exp100ths = exp100ths;
tmoutp->tp = ZTM_FUNC;
} else {
// MY DEBUG
_F = fopen("/tmp/recursive.txt", "a+");
fprintf( _F, "-- calc_timeout ZTM_FUNC condition not meet"
" tmoutp->tp[%d], exp100ths[%d] < tmoutp->exp100ths[%d]\n",
tmoutp->tp, exp100ths, tmoutp->exp100ths);
fclose(_F);
}
} else {
_F = fopen("/tmp/recursive.txt", "a+");
fprintf( _F, "-- calc_timeout diff[%d] > 0 condition
not meet\n", diff);
fclose(_F);
}
And obtain following logs:
raw_getbyte() - queueing_enabled (0)
-- calc_timeout do_keytmout[0], keytimeout[40]
-- calc_timeout timedfns != NULL
-- calc_timeout diff[0] > 0 condition not meet
-- ^^^ INIT calc_timeout tmout.tp(0) ZTM_NONE(0) ZTM_KEY(1) / BEGIN
RAW_GETBYTE() zle_main.c
It looks like calc_timeout handles diff < 0 and diff > 0 but not diff
== 0? in the "INIT" log "tmout.tp(0)" is the value (0 == ZTM_NONE)
returned from ^^^ up calc_timeout(), and it's not ZTM_FUNC like it
rather should be (timedfns != NULL).
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author