forked from aniani/vim
updated for version 7.3.031
Problem: Can't pass the X window ID to another application. Solution: Add v:windowid. (Christian J. Robinson, Lech Lorens)
This commit is contained in:
@@ -1657,6 +1657,11 @@ v:version Version number of Vim: Major version number times 100 plus
|
|||||||
*v:warningmsg* *warningmsg-variable*
|
*v:warningmsg* *warningmsg-variable*
|
||||||
v:warningmsg Last given warning message. It's allowed to set this variable.
|
v:warningmsg Last given warning message. It's allowed to set this variable.
|
||||||
|
|
||||||
|
*v:windowid* *windowid-variable*
|
||||||
|
v:windowid When any X11 based GUI is running or when running in a
|
||||||
|
terminal and Vim connects to the X server (|-X|) this will be
|
||||||
|
set to the window ID. Otherwise the value is zero.
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
4. Builtin Functions *functions*
|
4. Builtin Functions *functions*
|
||||||
|
|
||||||
|
@@ -362,6 +362,7 @@ static struct vimvar
|
|||||||
{VV_NAME("operator", VAR_STRING), VV_RO},
|
{VV_NAME("operator", VAR_STRING), VV_RO},
|
||||||
{VV_NAME("searchforward", VAR_NUMBER), 0},
|
{VV_NAME("searchforward", VAR_NUMBER), 0},
|
||||||
{VV_NAME("oldfiles", VAR_LIST), 0},
|
{VV_NAME("oldfiles", VAR_LIST), 0},
|
||||||
|
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* shorthand */
|
/* shorthand */
|
||||||
|
10
src/gui.c
10
src/gui.c
@@ -105,8 +105,18 @@ gui_start()
|
|||||||
|
|
||||||
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
|
#if defined(FEAT_GUI_GTK) || defined(FEAT_GUI_X11)
|
||||||
if (gui.in_use)
|
if (gui.in_use)
|
||||||
|
{
|
||||||
|
# ifdef FEAT_EVAL
|
||||||
|
Window x11_window;
|
||||||
|
Display *x11_display;
|
||||||
|
|
||||||
|
if (gui_get_x11_windis(&x11_window, &x11_display) == OK)
|
||||||
|
set_vim_var_nr(VV_WINDOWID, (long)x11_window);
|
||||||
|
# endif
|
||||||
|
|
||||||
/* Display error messages in a dialog now. */
|
/* Display error messages in a dialog now. */
|
||||||
display_errors();
|
display_errors();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MAY_FORK) && !defined(__QNXNTO__)
|
#if defined(MAY_FORK) && !defined(__QNXNTO__)
|
||||||
|
@@ -1738,6 +1738,11 @@ get_x11_windis()
|
|||||||
}
|
}
|
||||||
if (x11_window == 0 || x11_display == NULL)
|
if (x11_window == 0 || x11_display == NULL)
|
||||||
return (result = FAIL);
|
return (result = FAIL);
|
||||||
|
|
||||||
|
# ifdef FEAT_EVAL
|
||||||
|
set_vim_var_nr(VV_WINDOWID, (long)x11_window);
|
||||||
|
# endif
|
||||||
|
|
||||||
return (result = OK);
|
return (result = OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -714,6 +714,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
31,
|
||||||
/**/
|
/**/
|
||||||
30,
|
30,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1842,7 +1842,8 @@ typedef int proftime_T; /* dummy for function prototypes */
|
|||||||
#define VV_OP 52
|
#define VV_OP 52
|
||||||
#define VV_SEARCHFORWARD 53
|
#define VV_SEARCHFORWARD 53
|
||||||
#define VV_OLDFILES 54
|
#define VV_OLDFILES 54
|
||||||
#define VV_LEN 55 /* number of v: vars */
|
#define VV_WINDOWID 55
|
||||||
|
#define VV_LEN 56 /* number of v: vars */
|
||||||
|
|
||||||
#ifdef FEAT_CLIPBOARD
|
#ifdef FEAT_CLIPBOARD
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user