feat: upgrade bubbletea and remove deprecated code

Supersedes: https://github.com/charmbracelet/bubbles/pull/447
This commit is contained in:
Ayman Bagabas
2023-12-13 10:37:00 -08:00
parent 167e9067bc
commit 330dd3fa5d
3 changed files with 7 additions and 14 deletions
+4 -4
View File
@@ -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)