Handle CJK wide characters in helper.go Add multi width text ouput support in widgets
This commit is contained in:
@@ -20,8 +20,8 @@ func main() {
|
||||
|
||||
strs := []string{
|
||||
"[0] github.com/gizak/termui",
|
||||
"[1] editbox.go",
|
||||
"[2] iterrupt.go",
|
||||
"[1] 你好,世界",
|
||||
"[2] こんにちは世界",
|
||||
"[3] keyboard.go",
|
||||
"[4] output.go",
|
||||
"[5] random_out.go",
|
||||
|
||||
@@ -24,11 +24,11 @@ func main() {
|
||||
par0.Y = 1
|
||||
par0.HasBorder = false
|
||||
|
||||
par1 := termui.NewPar("Simple Text")
|
||||
par1 := termui.NewPar("你好,世界。")
|
||||
par1.Height = 3
|
||||
par1.Width = 17
|
||||
par1.X = 20
|
||||
par1.Border.Label = "Label"
|
||||
par1.Border.Label = "标签"
|
||||
|
||||
par2 := termui.NewPar("Simple text\nwith label. It can be multilined with \\n or break automatically")
|
||||
par2.Height = 5
|
||||
|
||||
Reference in New Issue
Block a user