feat!: use new bubbletea input api

This commit is contained in:
Ayman Bagabas
2024-08-22 10:59:17 -07:00
committed by bashbunni
parent f25096d1b6
commit 111fcdb9a8
12 changed files with 44 additions and 31 deletions
+4 -1
View File
@@ -973,7 +973,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
}
switch msg := msg.(type) {
case tea.KeyMsg:
case tea.KeyPressMsg:
switch {
case key.Matches(msg, m.KeyMap.DeleteAfterCursor):
m.col = clamp(m.col, 0, len(m.value[m.row]))
@@ -1063,6 +1063,9 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
m.insertRunesFromUserInput(msg.Runes)
}
case tea.PasteMsg:
m.insertRunesFromUserInput([]rune(msg))
case pasteMsg:
m.insertRunesFromUserInput([]rune(msg))