From 273f59bd1126efddfb4f2481d09e6e344034960f Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Tue, 4 Apr 2023 13:07:04 +0200 Subject: [PATCH] fix: adapt to lipgloss API change --- examples/list-simple/main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/list-simple/main.go b/examples/list-simple/main.go index 9208d05..8cc4290 100644 --- a/examples/list-simple/main.go +++ b/examples/list-simple/main.go @@ -4,6 +4,7 @@ import ( "fmt" "io" "os" + "strings" "github.com/charmbracelet/bubbles/list" 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 if index == m.Index() { - fn = func(s string) string { - return selectedItemStyle.Render("> " + s) + fn = func(s ...string) string { + return selectedItemStyle.Render("> " + strings.Join(s, " ")) } }