helix
helix copied to clipboard
Fix jump label rendering for multi-byte characters
Fixed rendering issue when jump labels are given to multibyte characters.
Specifically, when the character to which the label is given is a multibyte character, a process to convert the label to a full-width character has been added.
Example:
I do agree with jump on multibyte characters shouldn't mess up the rendering, but I rather it not be padded with space, for example これは should be shown as arれは instead of a r は or is there any specific reason you did so? That way both the jump labels will remain readable and consistent (without extra spaces) and at the same time the rendering remains the same.
Currently, only one Overlay can be assigned to each document character at most, so the ar label could not be assigned to こ (It is not padded with whitespace, but overlaid with a single double-byte character).
In order to minimize the diff as much as possible, I had to compromise in this way.
If we are going to change this, might as well tweak Overlay too, that's what I think.
I will try. Thank you.
Nit: the title and description say "multi-byte", but isn't it rather "multi-cell"? Because if I understand correctly, this is about visual width, not the number of bytes a character takes up in memory.
For example, there are many multi-byte characters that are single-width, and the single-byte tab character can be multiple terminal cells wide.