Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh/complist colours improperly handle multibyte characters
- X-seq: zsh-workers 39718
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zsh/complist colours improperly handle multibyte characters
- Date: Sun, 23 Oct 2016 11:23:58 -0700
- 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 :mime-version; bh=29VbwhODoHGZbHWE3nZ6BKXeoAW76aOoac29u7S6fVA=; b=ecLxmDxkCM/rtuZrT0dmEhZjljFim29m7owTFg9wD0V7krS3g/FaF3YeDhQXT7kBpP sh/YZf/VoTOAJdLaMXVAlIOEjHJAMApl9posIfpkhm5eBRzfN8I8CsEh+sEdxqPqwB37 HgBS243G2tpjzGQl4P4YwdAsQCG2w0vXR5DtLfa23wyyIIIZY1tw/9HKY2Au85k+GjL/ pbCBE4ocFfndqV93LZWBOrBpNhZOPIgvgc2RIeobY5p8OuFkxl81mwI7lA/50Dg5ZjSM mYkIyRlZ3nkMlPM2pUl902MGAvcPxB+sSSpZDIqjejIyHG/eraWpbkx6dX861QvfKnZS BUAw==
- In-reply-to: <20161023183048.3b6d21bb@ntlworld.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <etPan.58096283.690aeb81.31f@dani-mac.newcastle.edu.au> <161020210735.ZM6446@torch.brasslantern.com> <20161023183048.3b6d21bb@ntlworld.com>
On Oct 23, 6:30pm, Peter Stephenson wrote:
}
} So something like this might be better?
Yes, this appears to solve the issue, at least for multibyte characters
that take up only one screen column (as you noted).
} This is counting characters properly, but not taking into account the
} width of the character may be greater than 1. As the outer loop is
} assuming one position per character I don't know how to fix that
Looks like doiscol() would need to have the character width passed down
to it to correctly manipulate the color position arrays, and then both
i += chrwid and cc += chrwid or something like that.
As long as sendpos[] and curiscols[] don't change color in the middle
of a multi-column character I think the output part should be OK ...
but I'm not certain, either.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author