mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-01-12 06:51:05 +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 {
|
switch msg.Button {
|
||||||
|
|
||||||
case tea.MouseWheelUp:
|
case tea.MouseWheelUp:
|
||||||
lines := m.ViewUp()
|
lines := m.LineUp(3)
|
||||||
if m.HighPerformanceRendering {
|
if m.HighPerformanceRendering {
|
||||||
cmd = ViewUp(m, lines)
|
cmd = LineUp(m, lines)
|
||||||
}
|
}
|
||||||
|
|
||||||
case tea.MouseWheelDown:
|
case tea.MouseWheelDown:
|
||||||
lines := m.ViewDown()
|
lines := m.LineDown(3)
|
||||||
if m.HighPerformanceRendering {
|
if m.HighPerformanceRendering {
|
||||||
cmd = ViewDown(m, lines)
|
cmd = LineDown(m, lines)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user