mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-05 04:36:07 +00:00
feat: upgrade bubbletea and remove deprecated code
Supersedes: https://github.com/charmbracelet/bubbles/pull/447
This commit is contained in:
@@ -332,17 +332,17 @@ func (m Model) updateAsModel(msg tea.Msg) (Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
case tea.MouseMsg:
|
||||
if !m.MouseWheelEnabled {
|
||||
if !m.MouseWheelEnabled || msg.Action != tea.MouseActionPress {
|
||||
break
|
||||
}
|
||||
switch msg.Type {
|
||||
case tea.MouseWheelUp:
|
||||
switch msg.Button {
|
||||
case tea.MouseButtonWheelUp:
|
||||
lines := m.LineUp(m.MouseWheelDelta)
|
||||
if m.HighPerformanceRendering {
|
||||
cmd = ViewUp(m, lines)
|
||||
}
|
||||
|
||||
case tea.MouseWheelDown:
|
||||
case tea.MouseButtonWheelDown:
|
||||
lines := m.LineDown(m.MouseWheelDelta)
|
||||
if m.HighPerformanceRendering {
|
||||
cmd = ViewDown(m, lines)
|
||||
|
||||
Reference in New Issue
Block a user