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
+2 -2
View File
@@ -254,7 +254,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
m.Height = msg.Height - marginBottom
}
m.max = m.Height - 1
case tea.KeyMsg:
case tea.KeyPressMsg:
switch {
case key.Matches(msg, m.KeyMap.GoToTop):
m.selected = 0
@@ -463,7 +463,7 @@ func (m Model) didSelectFile(msg tea.Msg) (bool, string) {
return false, ""
}
switch msg := msg.(type) {
case tea.KeyMsg:
case tea.KeyPressMsg:
// If the msg does not match the Select keymap then this could not have been a selection.
if !key.Matches(msg, m.KeyMap.Select) {
return false, ""