Browse Source

Fixed Alerbox size with Unicode.

bugz 1 year ago
parent
commit
9054d1db50
1 changed files with 1 additions and 1 deletions
  1. 1 1
      door/box.go

+ 1 - 1
door/box.go

@@ -85,7 +85,7 @@ func (b *Box) Bottom() string {
 
 
 func AlertBox(text string, style int) []string {
 func AlertBox(text string, style int) []string {
 	var results []string
 	var results []string
-	b := Box{Width: len(text), Style: style}
+	b := Box{Width: StringLen(text), Style: style}
 	results = append(results, b.Top())
 	results = append(results, b.Top())
 	results = append(results, b.Row(text))
 	results = append(results, b.Row(text))
 	results = append(results, b.Bottom())
 	results = append(results, b.Bottom())