parameters: (self, cli, mouse_event)
docstring: Handle mouse events: clicking and scrolling.
docstring_summary: Handle mouse events: clicking and scrolling.
docstring_tokens: Handle mouse events : clicking and scrolling .
function: def mouse_handler(self, cli, mouse_event):
          """
          Handle mouse events: clicking and scrolling.
          """
          b = cli.current_buffer
  
          if mouse_event.event_type == MouseEventType.MOUSE_UP:
              # Select completion.
              b.go_to_completion(mouse_event.position.y)
              b.complete_state = None
  
          elif mouse_event.event_type == MouseEventType.SCROLL_DOWN:
              # Scroll up.
              b.complete_next(count=3, disable_wrap_around=True)
  
          elif mouse_event.event_type == MouseEventType.SCROLL_UP:
              # Scroll down.
              b.complete_previous(count=3, disable_wrap_around=True)
function_tokens: def mouse_handler ( self , cli , mouse_event ) : b = cli . current_buffer if mouse_event . event_type == MouseEventType . MOUSE_UP : # Select completion. b . go_to_completion ( mouse_event . position . y ) b . complete_state = None elif mouse_event . event_type == MouseEventType . SCROLL_DOWN : # Scroll up. b . complete_next ( count = 3 , disable_wrap_around = True ) elif mouse_event . event_type == MouseEventType . SCROLL_UP : # Scroll down. b . complete_previous ( count = 3 , disable_wrap_around = True )