(v string)
| 549 | } |
| 550 | |
| 551 | func (m TextInputModel) echoTransform(v string) string { |
| 552 | switch m.EchoMode { |
| 553 | case EchoPassword: |
| 554 | return strings.Repeat(string(m.EchoCharacter), rw.StringWidth(v)) |
| 555 | case EchoNone: |
| 556 | return "" |
| 557 | |
| 558 | default: |
| 559 | return v |
| 560 | } |
| 561 | } |
| 562 | |
| 563 | // Update is the Bubble Tea update loop. |
| 564 | func (m TextInputModel) Update(msg tea.Msg) (TextInputModel, tea.Cmd) { |