src/popupwin.c
void
popup_handle_scrollbar_click(win_T *wp, int row, int col)
{
    int	    height = popup_height(wp);
    int	    old_topline = wp->w_topline;

    if (popup_is_in_scrollbar(wp, row, col))
    {
	if (row >= height / 2)
	{
	    // Click in lower half, scroll down.
	    if (wp->w_topline < wp->w_buffer->b_ml.ml_line_count)
		++wp->w_topline;
	}
	else if (wp->w_topline > 1)
	    // click on upper half, scroll up.
	    --wp->w_topline;
	if (wp->w_topline != old_topline)
	{
	    popup_set_firstline(wp);
	    redraw_win_later(wp, NOT_VALID);
	}
    }
}
/*
 * Handle a click in a popup window, if it is in the scrollbar.
 */
Handle a click in a popup window, if it is in the scrollbar.
Handle a click in a popup window if it is in the scrollbar .
void
popup_handle_scrollbar_click(win_T *wp, int row, int col)
{
    int	    height = popup_height(wp);
    int	    old_topline = wp->w_topline;
    if (popup_is_in_scrollbar(wp, row, col))
    {
	if (row >= height / 2)
	{
	    if (wp->w_topline < wp->w_buffer->b_ml.ml_line_count)
		++wp->w_topline;
	}
	else if (wp->w_topline > 1)
	    --wp->w_topline;
	if (wp->w_topline != old_topline)
	{
	    popup_set_firstline(wp);
	    redraw_win_later(wp, NOT_VALID);
	}
    }
}
void popup_handle_scrollbar_click ( win_T * wp , int row , int col ) { int height = popup_height ( wp ) ; int old_topline = wp -> w_topline ; if ( popup_is_in_scrollbar ( wp , row , col ) ) { if ( row >= height / 2 ) { if ( wp -> w_topline < wp -> w_buffer -> b_ml . ml_line_count ) ++ wp -> w_topline ; } else if ( wp -> w_topline > 1 ) -- wp -> w_topline ; if ( wp -> w_topline != old_topline ) { popup_set_firstline ( wp ) ; redraw_win_later ( wp , NOT_VALID ) ; } } }
Handle a click in a popup window, if it is in the scrollbar.
Handle a click in a popup window if it is in the scrollbar .
// Click in lower half, scroll down. // click on upper half, scroll up.