mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-03-13 12:33:43 +03:00
Remove duplicate placeholder code
This commit is contained in:
parent
7b06eb538b
commit
c1b503585d
@ -105,23 +105,7 @@ func View(model tea.Model) string {
|
||||
|
||||
// Placeholder text
|
||||
if m.Value == "" && m.Placeholder != "" {
|
||||
var v string
|
||||
|
||||
if m.blink {
|
||||
v += cursor(
|
||||
termenv.String(m.Placeholder[:1]).
|
||||
Foreground(m.colorProfile.Color(m.PlaceholderColor)).
|
||||
String(),
|
||||
m.blink,
|
||||
)
|
||||
} else {
|
||||
v += cursor(m.Placeholder[:1], m.blink)
|
||||
}
|
||||
|
||||
v += termenv.String(m.Placeholder[1:]).
|
||||
Foreground(m.colorProfile.Color(m.PlaceholderColor)).
|
||||
String()
|
||||
return m.Prompt + v
|
||||
return placeholderView(m)
|
||||
}
|
||||
|
||||
v := m.Value[:m.pos]
|
||||
|
Loading…
Reference in New Issue
Block a user