m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

Change mattn/go-runewidth dependency to rivo/uniseg for accurate results

Related #3588 #3588 #3567
This commit is contained in:
Junegunn Choi
2024-01-21 02:52:28 +09:00
parent 66546208b2
commit 16f6473938
11 changed files with 59 additions and 51 deletions

View File

@@ -5,6 +5,8 @@ import (
"os"
"strconv"
"time"
"github.com/junegunn/uniseg"
)
// Types of user action
@@ -812,3 +814,7 @@ func initPalette(theme *ColorTheme) {
ColPreviewScrollbar = pair(theme.PreviewScrollbar, theme.PreviewBg)
ColPreviewSpinner = pair(theme.Spinner, theme.PreviewBg)
}
func runeWidth(r rune) int {
return uniseg.StringWidth(string(r))
}