fix: adapt to lipgloss API change

This commit is contained in:
Christian Muehlhaeuser 2023-04-04 13:07:04 +02:00
parent 6eb0209d13
commit 273f59bd11
1 changed files with 3 additions and 2 deletions

View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"io" "io"
"os" "os"
"strings"
"github.com/charmbracelet/bubbles/list" "github.com/charmbracelet/bubbles/list"
tea "github.com/charmbracelet/bubbletea" tea "github.com/charmbracelet/bubbletea"
@ -40,8 +41,8 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
fn := itemStyle.Render fn := itemStyle.Render
if index == m.Index() { if index == m.Index() {
fn = func(s string) string { fn = func(s ...string) string {
return selectedItemStyle.Render("> " + s) return selectedItemStyle.Render("> " + strings.Join(s, " "))
} }
} }