mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-03-13 12:33:43 +03:00
Fix backspace keybinding
This commit is contained in:
parent
86dbd03c1e
commit
3ac2b4881b
@ -36,6 +36,8 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) {
|
||||
case tea.KeyMsg:
|
||||
switch msg.Type {
|
||||
case tea.KeyBackspace:
|
||||
fallthrough
|
||||
case tea.KeyDelete:
|
||||
if len(m.Value) > 0 {
|
||||
m.Value = m.Value[:m.pos-1] + m.Value[m.pos:]
|
||||
m.pos--
|
||||
|
Loading…
Reference in New Issue
Block a user