src/popupwin.c
int
popup_create_preview_window(int info)
{
    win_T *wp = popup_create(NULL, NULL, info ? TYPE_INFO : TYPE_PREVIEW);

    if (wp == NULL)
	return FAIL;
    if (info)
	wp->w_popup_flags |= POPF_INFO;
    else
	wp->w_p_pvw = TRUE;

    // Set the width to a reasonable value, so that w_topline can be computed.
    if (wp->w_minwidth > 0)
	wp->w_width = wp->w_minwidth;
    else if (wp->w_maxwidth > 0)
	wp->w_width = wp->w_maxwidth;
    else
	wp->w_width = curwin->w_width;

    // Will switch to another buffer soon, dummy one can be wiped.
    wp->w_buffer->b_locked = FALSE;

    win_enter(wp, FALSE);
    return OK;
}
/*
 * Create a popup to be used as the preview or info window.
 * NOTE: this makes the popup the current window, so that the file can be
 * edited.  However, it must not remain to be the current window, the caller
 * must make sure of that.
 */
Create a popup to be used as the preview or info window.
NOTE: this makes the popup the current window, so that the file can be
edited.  However, it must not remain to be the current window, the caller
must make sure of that.
Create a popup to be used as the preview or info window . NOTE : this makes the popup the current window so that the file can be edited . However it must not remain to be the current window the caller must make sure of that .
int
popup_create_preview_window(int info)
{
    win_T *wp = popup_create(NULL, NULL, info ? TYPE_INFO : TYPE_PREVIEW);
    if (wp == NULL)
	return FAIL;
    if (info)
	wp->w_popup_flags |= POPF_INFO;
    else
	wp->w_p_pvw = TRUE;
    if (wp->w_minwidth > 0)
	wp->w_width = wp->w_minwidth;
    else if (wp->w_maxwidth > 0)
	wp->w_width = wp->w_maxwidth;
    else
	wp->w_width = curwin->w_width;
    wp->w_buffer->b_locked = FALSE;
    win_enter(wp, FALSE);
    return OK;
}
int popup_create_preview_window ( int info ) { win_T * wp = popup_create ( NULL , NULL , info ? TYPE_INFO : TYPE_PREVIEW ) ; if ( wp == NULL ) return FAIL ; if ( info ) wp -> w_popup_flags |= POPF_INFO ; else wp -> w_p_pvw = TRUE ; if ( wp -> w_minwidth > 0 ) wp -> w_width = wp -> w_minwidth ; else if ( wp -> w_maxwidth > 0 ) wp -> w_width = wp -> w_maxwidth ; else wp -> w_width = curwin -> w_width ; wp -> w_buffer -> b_locked = FALSE ; win_enter ( wp , FALSE ) ; return OK ; }
Create a popup to be used as the preview or info window.
Create a popup to be used as the preview or info window .
// Set the width to a reasonable value, so that w_topline can be computed. // Will switch to another buffer soon, dummy one can be wiped.