From: Daniel Hahler <genml+zsh-workers@thequod.de>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: [BUG] REPORTTIME parsed as 0 with error in zle widget
Date: Mon, 12 Feb 2018 10:05:08 +0100 [thread overview]
Message-ID: <6de993f2-b9ab-19ba-fa2c-417377a4e6f8@thequod.de> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 788 bytes --]
Given the following zle widget:
__fsel() {
exit 130 | while read item; do
:
done
}
mywidget() {
LBUFFER="${LBUFFER}$(__fsel)"
}
zle -N mywidget
bindkey '^r' mywidget
TEST CASE:
1. source it
2. set REPORTTIME=5
3. run it (ctrl-r)
RESULT:
time gets reported, but should not
getintvalue in should_report_time returns 0, although getstrvalue(v) is "5"!
This is caused by errflag being set in matheval, which makes it return 0!
And this gets caused by "exit 130" in __fsel.
I've noticed this with fzf and its widgets, where 130 is returned when selecting nothing.
btw: for fzf it makes sense to unset REPORTTIME like it has been done recently for completion functions already.
Cheers,
Daniel.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
next reply other threads:[~2018-02-12 9:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 9:05 Daniel Hahler [this message]
2018-02-12 20:28 ` Peter Stephenson
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=6de993f2-b9ab-19ba-fa2c-417377a4e6f8@thequod.de \
--to=genml+zsh-workers@thequod.de \
--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).