Move wcswidth into its own package as it is very slow to build

This commit is contained in:
Kovid Goyal
2022-08-24 22:05:51 +05:30
parent 5dca2a1a25
commit 5703a3370e
9 changed files with 25 additions and 23 deletions

View File

@@ -16,8 +16,8 @@ import (
"kitty"
"kitty/tools/tty"
"kitty/tools/tui"
"kitty/tools/utils"
"kitty/tools/wcswidth"
)
var RootCmd *cobra.Command
@@ -120,7 +120,7 @@ func format_line_with_indent(output io.Writer, text string, indent string, scree
var escapes strings.Builder
print_word := func(r rune) {
w := tui.Wcswidth(current_word.String())
w := wcswidth.Stringwidth(current_word.String())
if x+w > screen_width {
fmt.Fprintln(output)
fmt.Fprint(output, indent)