m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-15 14:53:47 -05:00

Use strings.ContainsRune instead (#3335)

This commit is contained in:
guangwu
2023-06-17 18:10:12 +08:00
committed by GitHub
parent d471067e3f
commit 4772bd8d4c
2 changed files with 4 additions and 4 deletions

View File

@@ -763,7 +763,7 @@ func (t *Terminal) ansiLabelPrinter(str string, color *tui.ColorPair, fill bool)
runes := []rune(text)
// Simpler printer for strings without ANSI colors or tab characters
if colors == nil && strings.IndexRune(str, '\t') < 0 {
if colors == nil && !strings.ContainsRune(str, '\t') {
length := util.StringWidth(str)
if length == 0 {
return nil, 0