From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10802 invoked by alias); 7 Dec 2016 02:57:58 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 40111 Received: (qmail 4215 invoked from network); 7 Dec 2016 02:57:58 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f173.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.173):SA:0(-0.7/5.0):. Processed in 1.100111 secs); 07 Dec 2016 02:57:58 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: zmwangx@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.173 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=xjn0cib1wAMG+FKa32BBqv0GVrMNBQrY41n5MToDi2k=; b=uh61Wy50w6TGq4l4rnyHSEDTyuhYTBrLqEzTFoD1nvkQleG+LMryMSmjFhkRBBumyT 5sDIX0g0nB8QJDjuzL3p7XZetR6WB/OBnJ4Ctsm3NJlrozyYk4pZ5bNsAUIcCRUJolcs NuAVScP8wKd1npz1rbTKk1TBP4I9NjvrSYRqLluOlsyCBinzpqqX7aVvNjexFJacvtAv aIBK0GuXGEWFzuMMpUoR3Yt1C2M9W0tp8feLP9aXL+gDMzYvwpzS8khLY0agviiwiEVw nnCat5+g7A9RZ7lXVa+Kc35+ma8w44cF7ln6kFQAgdKtkkXrrt7twNav1ViJAAdTxCRl 7deg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=xjn0cib1wAMG+FKa32BBqv0GVrMNBQrY41n5MToDi2k=; b=d/Fnzv4S+O2w2jVYTCLZUuj4EQ2zh9QIZFIfZa7vIdzzt5jAmlSaAYbkama5k7eoB9 H+YLBCfNAzm9PeoIk4kgMhnrxoKxUO+SmuwRsf6spvifih42LsMRzMQPZnCKEcDx4yIw jgiD7QAycqsBfqa1PLV3CMbhw1x67vDPn7THOyAhnqeDUX/DEVgHt6LI3/6cDcTTiqow WYfugxnPkhfOcyYwshyc30bF2I6FTsgLaOt8tLVt1o5qz04wcEBxzc6G+9fnmew+U+GI VBtAQMA/fupM5qhy0yeTYEPtNoI9C8a5Da2FYPfmdb0BTNtxNC/lzb+HXKUxRPg2yKvh sPRw== X-Gm-Message-State: AKaTC03NbINJAzNaBb4JRO7/XI+Kckaak7VCTqkKF0XMNaa1Lrc+wIychdb8CxdrTid84g== X-Received: by 10.200.52.204 with SMTP id x12mr63905306qtb.193.1481079470682; Tue, 06 Dec 2016 18:57:50 -0800 (PST) From: Zhiming Wang Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Regression in bracketed-paste-magic (not in 5.2, but affects 5.3's test releases) Message-Id: Date: Tue, 6 Dec 2016 21:57:49 -0500 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3251) 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=3D$HOME/history autoload -Uz bracketed-paste-magic zle -N bracketed-paste bracketed-paste-magic EOF cat >history <<'EOF' echo 1 echo 2 EOF HOME=3D$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=