Fix center-alignment of border/preview label

Fix #3421
This commit is contained in:
Junegunn Choi
2023-09-01 20:28:56 +09:00
parent 2c74f0a040
commit f50a7058d6
3 changed files with 9 additions and 1 deletions

View File

@@ -781,7 +781,7 @@ func (t *Terminal) ansiLabelPrinter(str string, color *tui.ColorPair, fill bool)
window.CPrint(*color, str)
}
}
return printFn, len(text)
return printFn, length
}
// Printer that correctly handles ANSI color codes and tab characters