Edit mouse actions

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-04 22:48:38 +02:00
parent abe6b5dde5
commit 20f9b7cf89
+14 -3
View File
@@ -146,10 +146,21 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
case tea.MouseWheelMsg: case tea.MouseWheelMsg:
if m.state == statePopup { if m.state == statePopup {
var cmd tea.Cmd switch msg.Button {
m.actionList, cmd = m.actionList.Update(msg) case tea.MouseWheelUp:
return m, cmd m.actionList.CursorUp()
case tea.MouseWheelDown:
m.actionList.CursorDown()
} }
} else {
switch msg.Button {
case tea.MouseWheelUp:
m.list.CursorUp()
case tea.MouseWheelDown:
m.list.CursorDown()
}
}
return m, nil
} }
if m.state == stateList { if m.state == stateList {