1
0
mirror of https://github.com/Maks1mS/bubbles.git synced 2025-05-04 03:43:43 +03:00

fix(textinput): support KeySpace in both present and future Bubble Tea versions

Closes 
This commit is contained in:
Christian Rocha 2022-05-28 21:33:14 -07:00
parent cd2593cfb7
commit a1e1b461b6

View File

@ -629,7 +629,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
resetBlink = m.deleteBeforeCursor() resetBlink = m.deleteBeforeCursor()
case tea.KeyCtrlV: // ^V paste case tea.KeyCtrlV: // ^V paste
return m, Paste return m, Paste
case tea.KeyRunes: // input regular characters case tea.KeyRunes, tea.KeySpace: // input regular characters
if msg.Alt && len(msg.Runes) == 1 { if msg.Alt && len(msg.Runes) == 1 {
if msg.Runes[0] == 'd' { // alt+d, delete word right of cursor if msg.Runes[0] == 'd' { // alt+d, delete word right of cursor
resetBlink = m.deleteWordRight() resetBlink = m.deleteWordRight()