src/popupwin.c
int
popup_do_filter(int c)
{
    static int	recursive = FALSE;
    int		res = FALSE;
    win_T	*wp;
    int		save_KeyTyped = KeyTyped;
    int		state;
    int		was_must_redraw = must_redraw;

    if (recursive)
	return FALSE;
    recursive = TRUE;

    if (c == K_LEFTMOUSE)
    {
	int row = mouse_row;
	int col = mouse_col;

	wp = mouse_find_win(&row, &col, FIND_POPUP);
	if (wp != NULL && popup_close_if_on_X(wp, row, col))
	    res = TRUE;
    }

    popup_reset_handled(POPUP_HANDLED_2);
    state = get_real_state();
    while (!res && (wp = find_next_popup(FALSE, POPUP_HANDLED_2)) != NULL)
	if (wp->w_filter_cb.cb_name != NULL
		&& (wp->w_filter_mode & state) != 0)
	    res = invoke_popup_filter(wp, c);

    if (must_redraw > was_must_redraw)
	redraw_after_callback(FALSE);
    recursive = FALSE;
    KeyTyped = save_KeyTyped;
    return res;
}
/*
 * Called when "c" was typed: invoke popup filter callbacks.
 * Returns TRUE when the character was consumed,
 */
Called when "c" was typed: invoke popup filter callbacks.
Returns TRUE when the character was consumed.
Called when " c " was typed : invoke popup filter callbacks . Returns TRUE when the character was consumed .
int
popup_do_filter(int c)
{
    static int	recursive = FALSE;
    int		res = FALSE;
    win_T	*wp;
    int		save_KeyTyped = KeyTyped;
    int		state;
    int		was_must_redraw = must_redraw;
    if (recursive)
	return FALSE;
    recursive = TRUE;
    if (c == K_LEFTMOUSE)
    {
	int row = mouse_row;
	int col = mouse_col;
	wp = mouse_find_win(&row, &col, FIND_POPUP);
	if (wp != NULL && popup_close_if_on_X(wp, row, col))
	    res = TRUE;
    }
    popup_reset_handled(POPUP_HANDLED_2);
    state = get_real_state();
    while (!res && (wp = find_next_popup(FALSE, POPUP_HANDLED_2)) != NULL)
	if (wp->w_filter_cb.cb_name != NULL
		&& (wp->w_filter_mode & state) != 0)
	    res = invoke_popup_filter(wp, c);
    if (must_redraw > was_must_redraw)
	redraw_after_callback(FALSE);
    recursive = FALSE;
    KeyTyped = save_KeyTyped;
    return res;
}
int popup_do_filter ( int c ) { static int recursive = FALSE ; int res = FALSE ; win_T * wp ; int save_KeyTyped = KeyTyped ; int state ; int was_must_redraw = must_redraw ; if ( recursive ) return FALSE ; recursive = TRUE ; if ( c == K_LEFTMOUSE ) { int row = mouse_row ; int col = mouse_col ; wp = mouse_find_win ( & row , & col , FIND_POPUP ) ; if ( wp != NULL && popup_close_if_on_X ( wp , row , col ) ) res = TRUE ; } popup_reset_handled ( POPUP_HANDLED_2 ) ; state = get_real_state ( ) ; while ( ! res && ( wp = find_next_popup ( FALSE , POPUP_HANDLED_2 ) ) != NULL ) if ( wp -> w_filter_cb . cb_name != NULL && ( wp -> w_filter_mode & state ) != 0 ) res = invoke_popup_filter ( wp , c ) ; if ( must_redraw > was_must_redraw ) redraw_after_callback ( FALSE ) ; recursive = FALSE ; KeyTyped = save_KeyTyped ; return res ; }
Called when "c" was typed: invoke popup filter callbacks.
Called when " c " was typed : invoke popup filter callbacks .