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
+3 -3
View File
@@ -771,7 +771,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
var cmds []tea.Cmd
switch msg := msg.(type) {
case tea.KeyMsg:
case tea.KeyPressMsg:
if key.Matches(msg, m.KeyMap.ForceQuit) {
return m, tea.Quit
}
@@ -806,7 +806,7 @@ func (m *Model) handleBrowsing(msg tea.Msg) tea.Cmd {
numItems := len(m.VisibleItems())
switch msg := msg.(type) {
case tea.KeyMsg:
case tea.KeyPressMsg:
switch {
// Note: we match clear filter before quit because, by default, they're
// both mapped to escape.
@@ -875,7 +875,7 @@ func (m *Model) handleFiltering(msg tea.Msg) tea.Cmd {
var cmds []tea.Cmd
// Handle keys
if msg, ok := msg.(tea.KeyMsg); ok {
if msg, ok := msg.(tea.KeyPressMsg); ok {
switch {
case key.Matches(msg, m.KeyMap.CancelWhileFiltering):
m.resetFiltering()