Correct mouse wheel behavior

This commit is contained in:
Christian Rocha 2020-06-23 13:10:50 -04:00
parent c9196e5407
commit f341e3c896
No known key found for this signature in database
GPG Key ID: D6CC7A16E5878018

View File

@ -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)
} }
} }
} }