diff options
| author | ruki <[email protected]> | 2020-12-07 22:36:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-12-07 22:36:38 +0800 |
| commit | 24b48fde3bb5c1edef6897e9ffa213ec1ae2e556 (patch) | |
| tree | afe78ad08217354194484e0214c55677ac3d45c5 /xmake/core/ui | |
| parent | 83c683cb9f564d73b84750ee1691d58b6b778eed (diff) | |
add utf8dialog
Diffstat (limited to 'xmake/core/ui')
| -rw-r--r-- | xmake/core/ui/label.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/core/ui/label.lua b/xmake/core/ui/label.lua index 64cdf646e..63edb4481 100644 --- a/xmake/core/ui/label.lua +++ b/xmake/core/ui/label.lua @@ -131,7 +131,7 @@ function label:splitext(text, width) local size = 0 for i = 1, #line do if bit.band(line:byte(i), 0xc0) ~= 0x80 then - size = size + 1 + size = size + line:wcwidth(i) if size > width then table.insert(result, line:sub(1, i - 1)) line = line:sub(i) |
