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

Re: zsh/complist colours improperly handle multibyte characters



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