Description
Currently, ansi.StringWidth(), ansi.StringWidthWc(), etc, incorrectly calculate \t (tab) characters. I am not sure if this is intended behavior or not. If it is, documentation should probably be updated to make it clear that users should strip those values out of their input.
Example test:
package main
import (
"fmt"
"github.com/charmbracelet/x/ansi"
)
func main() {
fmt.Println(ansi.StringWidth("\t"))
}
Returns 0. Using \ttest returns 4.
Version
master
Environment
Linux (Windows 11 & WSL2) / Windows Terminal / na