Skip to content

Commit

Permalink
Fix glitchy mousewheel scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
xiota committed Jun 4, 2023
1 parent 96a8611 commit 60209bb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/baca/components/contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,12 @@ def scroll_to_section(self, nav_point: str) -> None:
break

def on_mouse_scroll_down(self, _: events.MouseScrollDown) -> None:
self.screen.scroll_down()
if self._scroll_down_for_pointer(animate=False):
event.stop()

def on_mouse_scroll_up(self, _: events.MouseScrollUp) -> None:
self.screen.scroll_up()
if self._scroll_up_for_pointer(animate=False):
event.stop()

# NOTE: override initial message
def render(self):
Expand Down

0 comments on commit 60209bb

Please sign in to comment.