Use the new multi-stage unicode table for wcwidth

This commit is contained in:
Kovid Goyal
2025-03-24 14:20:40 +05:30
parent 7697a1650d
commit 3d0e45ace8
12 changed files with 34 additions and 6719 deletions

View File

@@ -130,3 +130,11 @@ func (s *GraphemeSegmentationState) Step(ch CharProps) bool {
}
return add_to_cell
}
func Runewidth(code rune) int {
return CharPropsFor(code).Width()
}
func IsEmojiPresentationBase(code rune) bool {
return CharPropsFor(code).Is_emoji_presentation_base() == 1
}

File diff suppressed because one or more lines are too long