mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-09 20:44:03 -08:00
refactor(font): remove unnecessary string formatting
This commit is contained in:
parent
2450bb0d6c
commit
1510d207a2
|
@ -51,8 +51,6 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
|
|||
return
|
||||
}
|
||||
|
||||
str := fmt.Sprintf(i.Name)
|
||||
|
||||
fn := itemStyle.Render
|
||||
if index == m.Index() {
|
||||
fn = func(s ...string) string {
|
||||
|
@ -60,7 +58,7 @@ func (d itemDelegate) Render(w io.Writer, m list.Model, index int, listItem list
|
|||
}
|
||||
}
|
||||
|
||||
fmt.Fprint(w, fn(str))
|
||||
fmt.Fprint(w, fn(i.Name))
|
||||
}
|
||||
|
||||
const (
|
||||
|
|
Loading…
Reference in a new issue