mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 15:04:50 +02:00
Move wcswidth into its own package as it is very slow to build
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user