mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-03-14 13:03:44 +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:
|
case tea.KeyMsg:
|
||||||
switch msg.Type {
|
switch msg.Type {
|
||||||
case tea.KeyBackspace:
|
case tea.KeyBackspace:
|
||||||
|
fallthrough
|
||||||
|
case tea.KeyDelete:
|
||||||
if len(m.Value) > 0 {
|
if len(m.Value) > 0 {
|
||||||
m.Value = m.Value[:m.pos-1] + m.Value[m.pos:]
|
m.Value = m.Value[:m.pos-1] + m.Value[m.pos:]
|
||||||
m.pos--
|
m.pos--
|
||||||
|
Loading…
Reference in New Issue
Block a user