Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Pasting UTF-8 characters with bracketed-paste-magic seems broken in 5.1

On Thu, 10 Sep 2015 09:16:49 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

 On Sep 10,  5:07pm, Peter Stephenson wrote:
> }
> } read-command doesn't explicitly handle multibyte characters in the way
> } self-insert does.  self-insert gets the remainder of the character.
> Hrm.  So the problem is that a multibyte character isn't explicitly
> bound to self-insert, rather the first byte is bound to self-insert
> and self-insert knows that when it sees that byte it should read more?


> Should be possible to handle that in the loop in bracketed-paste-magic
> with a test of $KEYS and a call to read -k.  Might try to get to this
> later, out of time now ... or someone else can jump in.

Not really clear to me what level the "right" fix is, since this was all
designed for a pre-multibyte world... I don't think we have a test for a
valid/invalid multibyte character at the shell level currently, do we?
Wouldn't be hard to add [[:INCOMPLETE::]] or [[:INVALID:]] to the
pattern code, but that's an extra step...


Messages sorted by: Reverse Date, Date, Thread, Author