feat!: use new bubbletea input api

This commit is contained in:
Ayman Bagabas
2024-07-22 14:57:15 -04:00
parent a9344b5953
commit e6e18e5012
14 changed files with 61 additions and 37 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
//
// func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
// switch msg := msg.(type) {
// case tea.KeyMsg:
// case tea.KeyPressMsg:
// switch {
// case key.Matches(msg, DefaultKeyMap.Up):
// // The user pressed up
@@ -129,7 +129,7 @@ type Help struct {
}
// Matches checks if the given KeyMsg matches the given bindings.
func Matches(k tea.KeyMsg, b ...Binding) bool {
func Matches(k tea.KeyPressMsg, b ...Binding) bool {
keys := k.String()
for _, binding := range b {
for _, v := range binding.keys {