From 0bc4f8076ef5edd97a8b2e3dd72e1ea276c53cbb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Jul 2023 07:31:14 +0530 Subject: [PATCH] Fix #6410 --- kittens/themes/ui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kittens/themes/ui.go b/kittens/themes/ui.go index 16a275e77..5e7328839 100644 --- a/kittens/themes/ui.go +++ b/kittens/themes/ui.go @@ -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() {