From: Zhiming Wang <zmwangx@gmail.com>
To: zsh-workers@zsh.org
Subject: Regression in bracketed-paste-magic (not in 5.2, but affects 5.3's test releases)
Date: Tue, 6 Dec 2016 21:57:49 -0500 [thread overview]
Message-ID: <B3CEC842-B789-472A-8C8B-89391950787A@gmail.com> (raw)
Commit 20948d0 (38579: Functions/Zle/bracketed-paste-magic: simplify saving and
restoring of state) introduced a regression that results in the ZLE buffer
being repeated when pasting under certain conditions. It was introduced after
5.2 and currently affects 5.2-test-1, 5.2-test-2 and master.
Here's a simple reproducer:
1. Set up environment (.zshrc and history) and open a new session with that
environment:
cd "$(mktemp -d /tmp/XXXXXXX)"
cat >.zshrc <<'EOF'
HISTFILE=$HOME/history
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
EOF
cat >history <<'EOF'
echo 1
echo 2
EOF
HOME=$PWD zsh
2. Press the following sequence of keys (no space): ^R echo ^R ^E
(history-incremental-search-backward, "echo",
history-incremental-search-backward, end-of-line), then paste something,
say, "zsh".
At this point, we should expect
echo 1zsh
in the ZLE buffer. Instead, we see
echo 1zshecho 1
note the buffer prior to pasting being repeated at the end.
Here's a terminal recording that demonstrates the wrong behavior in action:
https://asciinema.org/a/95254.
Best,
Zhiming
next reply other threads:[~2016-12-07 2:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-07 2:57 Zhiming Wang [this message]
2016-12-07 3:25 ` Bart Schaefer
2016-12-07 4:02 ` Zhiming Wang
2016-12-07 12:39 ` Oliver Kiddle
2016-12-07 18:23 ` Zhiming Wang
2016-12-24 8:28 ` Bart Schaefer
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=B3CEC842-B789-472A-8C8B-89391950787A@gmail.com \
--to=zmwangx@gmail.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).