Fix #6410
This commit is contained in:
parent
22c2687432
commit
0bc4f8076e
1 changed files with 1 additions and 1 deletions
|
|
@ -398,7 +398,7 @@ func (self *handler) draw_tab_bar() {
|
|||
func center_string(x string, width int) string {
|
||||
l := wcswidth.Stringwidth(x)
|
||||
spaces := int(float64(width-l) / 2)
|
||||
return strings.Repeat(" ", spaces) + x + strings.Repeat(" ", width-(spaces+l))
|
||||
return strings.Repeat(" ", utils.Max(0, spaces)) + x + strings.Repeat(" ", utils.Max(0, width-(spaces+l)))
|
||||
}
|
||||
|
||||
func (self *handler) draw_theme_demo() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue