mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-24 14:44:38 +03:00
fix(textarea): Add deleteWordRight
This commit is contained in:
parent
2a2fb10f5f
commit
3a34fc4ff8
@ -752,6 +752,12 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
|
|||||||
}
|
}
|
||||||
m.deleteWordLeft()
|
m.deleteWordLeft()
|
||||||
case key.Matches(msg, m.KeyMap.DeleteWordForward):
|
case key.Matches(msg, m.KeyMap.DeleteWordForward):
|
||||||
|
m.col = clamp(m.col, 0, len(m.value[m.row]))
|
||||||
|
if m.col >= len(m.value[m.row]) {
|
||||||
|
m.mergeLineBelow(m.row)
|
||||||
|
break
|
||||||
|
}
|
||||||
|
m.deleteWordRight()
|
||||||
case key.Matches(msg, m.KeyMap.InsertNewline):
|
case key.Matches(msg, m.KeyMap.InsertNewline):
|
||||||
if len(m.value) >= maxHeight {
|
if len(m.value) >= maxHeight {
|
||||||
return m, nil
|
return m, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user