mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 19:27:58 +08:00
Update wcwidth implementation.
This commit is contained in:
parent
1e0bc746b8
commit
b240fb39f1
|
@ -84,9 +84,11 @@ func Wcwidth(r rune) int {
|
|||
(r >= 0xfe10 && r <= 0xfe19) || /* Vertical forms */
|
||||
(r >= 0xfe30 && r <= 0xfe6f) || /* CJK Compatibility Forms */
|
||||
(r >= 0xff00 && r <= 0xff60) || /* Fullwidth Forms */
|
||||
(r >= 0xffe0 && r <= 0xffe6) ||
|
||||
(r >= 0x20000 && r <= 0x2fffd) ||
|
||||
(r >= 0x30000 && r <= 0x3fffd)) {
|
||||
(r >= 0xffe0 && r <= 0xffe6) || /* Fullwidth Forms */
|
||||
(r >= 0x20000 && r <= 0x2fffd) || /* CJK Extensions */
|
||||
(r >= 0x30000 && r <= 0x3fffd) || /* Reserved for historical Chinese scripts */
|
||||
(r >= 0x25a0 && r <= 0x27bf) || // Geometric Shapes, Miscellaneous Symbols, Dingbats
|
||||
(r >= 0x1f300 && r <= 0x1f6ff)) { // Miscellaneous Symbols and Pictographs ... Geometric Shapes Extended
|
||||
return 2
|
||||
}
|
||||
return 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user