mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 22:32:59 +03:00
Correct mouse wheel behavior
This commit is contained in:
parent
c9196e5407
commit
f341e3c896
@ -349,15 +349,15 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) {
|
||||
switch msg.Button {
|
||||
|
||||
case tea.MouseWheelUp:
|
||||
lines := m.ViewUp()
|
||||
lines := m.LineUp(3)
|
||||
if m.HighPerformanceRendering {
|
||||
cmd = ViewUp(m, lines)
|
||||
cmd = LineUp(m, lines)
|
||||
}
|
||||
|
||||
case tea.MouseWheelDown:
|
||||
lines := m.ViewDown()
|
||||
lines := m.LineDown(3)
|
||||
if m.HighPerformanceRendering {
|
||||
cmd = ViewDown(m, lines)
|
||||
cmd = LineDown(m, lines)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user