diff options
author | Dan Gudmundsson <[email protected]> | 2017-06-02 14:25:02 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2017-08-16 10:03:28 +0200 |
commit | 5f56b49c752a16ee28244981ca9b197ffd5fa691 (patch) | |
tree | 17a9563e03ecb40ba4cfe96cea2b89209ed1875b /erts/emulator/beam/erl_ptab.c | |
parent | b182febe36aa63eb8290f24ba4b7932673a9a9bc (diff) | |
download | otp-5f56b49c752a16ee28244981ca9b197ffd5fa691.tar.gz otp-5f56b49c752a16ee28244981ca9b197ffd5fa691.tar.bz2 otp-5f56b49c752a16ee28244981ca9b197ffd5fa691.zip |
stdlib: Improve edlin handling of unicode chars
Let edlin handle grapheme clusters instead of codepoints to
improve the handling multi-codepoints characters.
The ttsl driver (and protocol) still expects all lengths as
codepoints.
Previously it was expected that each codepoint used (at least) one
terminal column for each codepoint, and a hack was made for wide
characters (multicolumn) by patching in TAGGED characters to occupy
the extra space so that codepoint index was equal column index.
This didn't work at all for combining codepoints that do not occupy any
more space than the previous character.
Improved this handling by calculating column positions in move_cursor.
This is based on wcwidth() and is not perfect, wcwidth() is wrong for
some codepoints and wcwidth() can not know with Hangul graphemes for
example. But it works better than before without making a major change
in the protocol.
Diffstat (limited to 'erts/emulator/beam/erl_ptab.c')
0 files changed, 0 insertions, 0 deletions