Skip to content

Commit

Permalink
fix: Unicode character encoding error
Browse files Browse the repository at this point in the history
  • Loading branch information
lc-1010 authored and meowgorithm committed Sep 28, 2023
1 parent 540c8ac commit f53b3d9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions textinput/textinput.go
Original file line number Diff line number Diff line change
Expand Up @@ -705,16 +705,16 @@ func (m Model) View() string {
func (m Model) placeholderView() string {
var (
v string
p = m.Placeholder
p = []rune(m.Placeholder)
style = m.PlaceholderStyle.Inline(true).Render
)

m.Cursor.TextStyle = m.PlaceholderStyle
m.Cursor.SetChar(p[:1])
m.Cursor.SetChar(string(p[:1]))
v += m.Cursor.View()

// The rest of the placeholder text
v += style(p[1:])
v += style(string(p[1:]))

return m.PromptStyle.Render(m.Prompt) + v
}
Expand Down

0 comments on commit f53b3d9

Please sign in to comment.