Zsh Mailing List Archive
Messages sorted by:
Re: zsh/complist colours improperly handle multibyte characters
- X-seq: zsh-workers 39696
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh/complist colours improperly handle multibyte characters
- Date: Thu, 20 Oct 2016 21:07:35 -0700
- Cc: danielsh@xxxxxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject:cc :mime-version; bh=X2Jywoc2Kbo02iFcPjy2zsqgrF9URO/TXE/fYzTGka8=; b=j3u5MppMLIpEabnnFoEEd2aKSp3PijKanWwfDjnjVGRjPZFKgt2emVXFC+iP//hSn1 pDKLr2CFad1BPA8IZP5IbcppQiDGQEkGn87F0ruOQ7D4TelGM1maQAAdAl9fx9hRtcZC BwbpuZrfuwW3K6OSrU3zkHwGbJqy9PtH+LlvPZ5g8QWC+k7kBcZRSdM+EguqtFoMQcBg QkNmFYxZJbMy2KQxYra4aUOxrrz8dGbTvEjdG2/OwVIuYfDwmHdoStH/6n6AFCKp2zOF IycPpSgANNIpZsZYtCKnZfds2HE9ImXboJ6aUNO++xBwz0Fx5LIOmPG4oHRoPXnVdaw6 hG5g==
- In-reply-to: <etPan.email@example.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <etPan.firstname.lastname@example.org>
On Oct 21, 12:09pm, Danielle McLean wrote:
} Presumably, zsh/complist's pattern parsing is only aware of one- and
} two-byte chars, and its (#b)-based grouping mistakenly assumes that
} all characters are single bytes.
Reaching this conclusion might be understandable, but it is pretty far
off the mark.
The problem with the (#b) example is not that the pattern has matched
improperly, but that #ifdef MULTIBYTE_SUPPORT has never been worked
into complist.c:clprintfmt(). So it is counting the bytes rather than
the display width when deciding where to start/stop coloring.
I'm not going to dive into that, I don't know the multibyte handling
code well enough.
The problem with the vertical-bar example is that the pattern did not
compile correctly at all. The same effect occurs if you use "#" in
that position -- it results in an invalid pattern which is silently
Stepping through with gdb for the vertical-bar pattern, I get:
pattern.c:1530: BUG: - missing from numeric glob
I thought this was a metafication problem, and indeed if I metafy()
the string passed to patcompile() then the compilation succeeds, but
then the resulting program fails to match for even simple patterns
so nothing is ever colored.
This is about as far as I'm going to be able to get with this.
Messages sorted by: