Skip to content

Commit

Permalink
Merge pull request #14 from n-peugnet/fix-scroll-regression
Browse files Browse the repository at this point in the history
Fix scroll regression introduced in #11
  • Loading branch information
tulir authored Apr 9, 2024
2 parents 7bcc294 + c8e4bd2 commit f020cbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ func (app *Application) Start() error {
redraw = app.root.OnPasteEvent(customEvt)
}
case *tcell.EventMouse:
hasMotion := app.prevMouseEvt.Buttons() == event.Buttons()
onlyButtons := event.Buttons() < tcell.WheelUp
hasMotion := onlyButtons && app.prevMouseEvt.Buttons() == event.Buttons()
customEvt := customMouseEvent{event, hasMotion}
app.prevMouseEvt = event
redraw = app.root.OnMouseEvent(customEvt)
Expand Down

0 comments on commit f020cbb

Please sign in to comment.