src/popupwin.c
void
popup_set_title(win_T *wp)
{
    if (wp->w_buffer->b_fname != NULL)
    {
	char_u	dirname[MAXPATHL];
	size_t	len;

	mch_dirname(dirname, MAXPATHL);
	shorten_buf_fname(wp->w_buffer, dirname, FALSE);

	vim_free(wp->w_popup_title);
	len = STRLEN(wp->w_buffer->b_fname) + 3;
	wp->w_popup_title = alloc((int)len);
	if (wp->w_popup_title != NULL)
	    vim_snprintf((char *)wp->w_popup_title, len, " %s ",
							wp->w_buffer->b_fname);
	redraw_win_later(wp, VALID);
    }
}
/*
 * Set the title of the popup window to the file name.
 */
Set the title of the popup window to the file name.
Set the title of the popup window to the file name .
void
popup_set_title(win_T *wp)
{
    if (wp->w_buffer->b_fname != NULL)
    {
	char_u	dirname[MAXPATHL];
	size_t	len;
	mch_dirname(dirname, MAXPATHL);
	shorten_buf_fname(wp->w_buffer, dirname, FALSE);
	vim_free(wp->w_popup_title);
	len = STRLEN(wp->w_buffer->b_fname) + 3;
	wp->w_popup_title = alloc((int)len);
	if (wp->w_popup_title != NULL)
	    vim_snprintf((char *)wp->w_popup_title, len, " %s ",
							wp->w_buffer->b_fname);
	redraw_win_later(wp, VALID);
    }
}
void popup_set_title ( win_T * wp ) { if ( wp -> w_buffer -> b_fname != NULL ) { char_u dirname [ MAXPATHL ] ; size_t len ; mch_dirname ( dirname , MAXPATHL ) ; shorten_buf_fname ( wp -> w_buffer , dirname , FALSE ) ; vim_free ( wp -> w_popup_title ) ; len = STRLEN ( wp -> w_buffer -> b_fname ) + 3 ; wp -> w_popup_title = alloc ( ( int ) len ) ; if ( wp -> w_popup_title != NULL ) vim_snprintf ( ( char * ) wp -> w_popup_title , len , " " , wp -> w_buffer -> b_fname ) ; redraw_win_later ( wp , VALID ) ; } }
Set the title of the popup window to the file name.
Set the title of the popup window to the file name .