From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28700 invoked by alias); 8 Dec 2015 10:48:52 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21071 Received: (qmail 22780 invoked from network); 8 Dec 2015 10:48:50 -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-AuditID: cbfec7f5-f79b16d000005389-2b-5666b33269b9 Date: Tue, 08 Dec 2015 10:38:39 +0000 From: Peter Stephenson To: "Raymond W. Ko" , zsh-users@zsh.org Subject: Re: Possible bug with bindkey and Unicode characters in 5.2? Message-id: <20151208103839.38196abc@pwslap01u.europe.root.pri> In-reply-to: <5665F054.9070705@gmail.com> References: <5665F054.9070705@gmail.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsVy+t/xK7pGm9PCDP4u4LO4creV0WLHyZWM DkweO2fdZfdYdfADUwBTFJdNSmpOZllqkb5dAlfG0Tev2Qum8Fac3DCVrYHxOFcXIyeHhICJ xPRDd1ggbDGJC/fWs3UxcnEICSxllPj06zc7hNPAJPFiTysThHOaUWLntndQmTOMEkfuLmMC 6WcRUJVYeeEM2Cw2AUOJqZtmM4LYIgL2Er//fQKrERZwlTi0/gZYnBcoPunVL7B6TgFNicMN L4GGcgAN1ZBY06AIEuYX0Je4+heiVQKofOaVM1CtghI/Jt8Da2UWUJeYNG8RM4StLfHk3QVW EFsIKH7j7m72CYzCs5C0zELSMgtJywJG5lWMoqmlyQXFSem5RnrFibnFpXnpesn5uZsYISH+ dQfj0mNWhxgFOBiVeHgVTqaGCbEmlhVX5h5ilOBgVhLh5Z2VFibEm5JYWZValB9fVJqTWnyI UZqDRUmcd+au9yFCAumJJanZqakFqUUwWSYOTqkGRuf/jyZUuhzsXaj64qD+gsvmDnwz3n7q el1buNcgmIFXZ3/JikPRlkor9u5cEzxh1heZZWvUj++4vUZacHvdXuMCB1mhX3+6joStONLE fjfp75Pdy7+8XPZq+0wmzgL/GXL/bPkqMrnK5061+lJwPmT6Fa19Fed+f5ijdC6o1WrKXj2F Xx/fTnRVYinOSDTUYi4qTgQAcqrIzm0CAAA= On Mon, 07 Dec 2015 15:47:16 -0500 "Raymond W. Ko" wrote: > bindkey -s =CE=B8 '"\C-b"' > bindkey -s =CF=89 "'\C-b'" > bindkey -s =CF=85 ">\C-b<" > bindkey -s =CF=83 "}\C-b{" > bindkey -s =CF=86 ")\C-b(" > bindkey -s =CF=86 "asdf" > bindkey -s =CF=81 "]\C-b[" >=20 > On zsh 5.1 and 5.0.1, this works as expected. However, in 5.2 there=20 > seems to be a pause for half a second before a question mark appears. Yes, this is a general problem. This fix should be good enough. I think there will be slight hiccups when there are a mixture of key bindings for multibyte sequences and self-insert characters beginning with the same bytes, but that's inevitable to some extent --- this should certainly be no worse than before. Bart ensured that even if we do eventually need a self-insert it will work the way it always did, which was fine in most cases, just a bit icky if you really needed the full character to be inserted in good time. (A volunteer to pick up ZLE testing would be useful. Felix did quite a lot of work on this some time ago which no one ever had the time to merge.) pws diff --git a/Src/Zle/zle_keymap.c b/Src/Zle/zle_keymap.c index 069580f..d6d116b 100644 --- a/Src/Zle/zle_keymap.c +++ b/Src/Zle/zle_keymap.c @@ -1503,7 +1503,7 @@ getkeymapcmd(Keymap km, Thingy *funcp, char **strp) f->widget->flags & ZLE_VIOPER); #ifdef MULTIBYTE_SUPPORT if ((f =3D=3D Th(z_selfinsert) || f =3D=3D Th(z_selfinsertunmeta)) && - !lastchar_wide_valid) { + !lastchar_wide_valid && !ispfx) { int len; VARARR(char, mbc, MB_CUR_MAX); ZLE_INT_T inchar =3D getrestchar(lastchar, mbc, &len);