forked from Mirrors/bubbletea
fix: adapt to lipgloss API change
This commit is contained in:
parent
6eb0209d13
commit
273f59bd11
|
@ -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, " "))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue