@ 261105.1

260419.4 · 14f3ad493cf3e039835fc1e23256f95c8e2b73df

Move away from uniseg to faster clipperhouse/displaywidth

Use an intern string cache to reduce allocations.

This has improved correctness, and substantial performance improvements.

reading declarations

Changes to eastasian.go. All files

eastasian.go

@@ -1,4 +1,4 @@-// Copyright 2025 The TCell Authors+// Copyright 2026 The TCell Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.@@ -15,16 +15,7 @@ package tcell  import (-	"os"-	"strings"--	"github.com/rivo/uniseg"+	"github.com/gdamore/tcell/v3/internal/widthutil" ) -func init() {-	if rw := strings.ToLower(os.Getenv("RUNEWIDTH_EASTASIAN")); rw == "1" || rw == "true" || rw == "yes" {-		uniseg.EastAsianAmbiguousWidth = 2-	} else {-		uniseg.EastAsianAmbiguousWidth = 1-	}-}+var textWidthOptions = widthutil.Options()