From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13747 invoked by alias); 11 Sep 2015 19:23:08 -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: 36492 Received: (qmail 15788 invoked from network); 11 Sep 2015 19:23:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=yUyYM2ecBZGJ3FPdeMyxCt1OrIh6gF9Cl+bPv7ypkR8=; b=J2Jm3tgkUiEBZkNq/8WLMizv9PNUF9MIuTr054N3UB2XiWMhmRub0PtOtgOWo6e0rD jxHZf1PjOK6Ec/Vd9X6Iup3eY8aUHStc1JZCpOF7aj5N4wAseH4tkwHvrJyS/nLrlFmm 417GY/jsZ1hLB4dXBicDMFECfP1BC+SagDE1yWVjE9x88+k6NhsPvfWhTExSVe/IRzNP /pbvl4+4IM13aliyvbiFzRVhObvyyE1iYdnEYb+C4B+M7jbLXXs1Tp8g+UQwYW5osp5v 3W6z8H5O717jXc83X09b5oFOKPUcDSW+kynZsWewNsScwAtvDs4g1pboFWhcqxE67NyM ZMyg== X-Gm-Message-State: ALoCoQl/6iz6NMYEXPndBUHsiquqHrjDKrYGpsFpyvT/Ktdh3By1NtAcZkVbtjsvtsvr6H20EZDJ X-Received: by 10.202.73.142 with SMTP id w136mr327156oia.32.1441999384424; Fri, 11 Sep 2015 12:23:04 -0700 (PDT) From: Bart Schaefer Message-Id: <150911122259.ZM8932@torch.brasslantern.com> Date: Fri, 11 Sep 2015 12:22:59 -0700 In-Reply-To: <20150911184129.46145c0e@ntlworld.com> Comments: In reply to Peter Stephenson "Re: Pasting UTF-8 characters with bracketed-paste-magic seems broken in 5.1" (Sep 11, 6:41pm) References: <20150906155751.GD3721@sym.noone.org> <150910073920.ZM21998@torch.brasslantern.com> <20150910145714.GO3721@sym.noone.org> <150910084516.ZM22892@torch.brasslantern.com> <20150910170705.0fbeb302@pwslap01u.europe.root.pri> <150910091649.ZM3715@torch.brasslantern.com> <20150910172840.0a1899f4@pwslap01u.europe.root.pri> <20150910195713.340861cb@ntlworld.com> <20150910203527.260abe86@ntlworld.com> <150910162415.ZM3990@torch.brasslantern.com> <20150911091031.0a227ebd@pwslap01u.europe.root.pri> <150911083344.ZM8783@torch.brasslantern.com> <20150911184129.46145c0e@ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Pasting UTF-8 characters with bracketed-paste-magic seems broken in 5.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 11, 6:41pm, Peter Stephenson wrote: } } > Given this, if your patch from 36483 seems to work for you, go ahead and } > commit it so you can do the 5.1.1 release. } } I simply tried it with a few simple accented latin characters and it } seemed to work. It doesn't sound like it's had much testing otherwise. } I've committed it. Now that it's out: (1) someone who was experiencing the multibyte problem should try it again (2) it should be tested for the case where a multibyte character is bound to a widget that has been declared in active-widgets I'm actually pretty sure this is still broken for obscure cases, but in fact the whole scheme in which multi-byte recognition is buried inside the self-insert widget is probaby also broken for those same cases even when simply typing. E.g., if I override the self-insert widget with my own, my widget is only going to get passed in $KEYS the first byte of any multibyte character. (Just verified this with 4.3.17.) Compare: shove-in-LBUFFER() { LBUFFER+=$KEYS } zle -N self-insert shove-in-LBUFFER Against: call-self-insert() { zle .self-insert } zle -N self-insert call-self-insert With shove-in-LBUFFER, pasting a three-byte multibyte character results in interpretation as three separate characters. With call-self-insert, the trailing bytes are picked up by getrestchar() and the insert works. So we're no worse off than before, but this needs re-thinking.