Skip to content
Myr

fix: adapt to lipgloss API change

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian Muehlhaeuser · committed by Christian Muehlhaeuser · parent 6eb0209 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:examples/list-simple/main.go+3 added-2 removed
2 unmodified lines
3import (4 "fmt"5 "io"6 "os"7 "strings"89 "github.com/charmbracelet/bubbles/list"10 tea "github.com/charmbracelet/bubbletea"11 "github.com/charmbracelet/lipgloss"
28 unmodified lines
40 str := fmt.Sprintf("%d. %s", index+1, i)4142 fn := itemStyle.Render43 if index == m.Index() {43 fn = func(s string) string {44 return selectedItemStyle.Render("> " + s)44 fn = func(s ...string) string {45 return selectedItemStyle.Render("> " + strings.Join(s, " "))46 }47 }4849 fmt.Fprint(w, fn(str))
79 unmodified lines