mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 12:46:14 +00:00
feat!: use new bubbletea input api
This commit is contained in:
@@ -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, ""
|
||||
|
||||
Reference in New Issue
Block a user