mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.4.234
Problem: Can't get the command that was used to start Vim. Solution: Add v:progpath. (Viktor Kojouharov)
This commit is contained in:
@@ -1556,6 +1556,12 @@ v:profiling Normally zero. Set to one after using ":profile start".
|
|||||||
v:progname Contains the name (with path removed) with which Vim was
|
v:progname Contains the name (with path removed) with which Vim was
|
||||||
invoked. Allows you to do special initialisations for |view|,
|
invoked. Allows you to do special initialisations for |view|,
|
||||||
|evim| etc., or any other name you might symlink to Vim.
|
|evim| etc., or any other name you might symlink to Vim.
|
||||||
|
Read-only.
|
||||||
|
|
||||||
|
*v:progpath* *progpath-variable*
|
||||||
|
v:progpath Contains the command with which Vim was invoked, including the
|
||||||
|
path. Useful if you want to message a Vim server using a
|
||||||
|
|--remote-expr|.
|
||||||
Read-only.
|
Read-only.
|
||||||
|
|
||||||
*v:register* *register-variable*
|
*v:register* *register-variable*
|
||||||
|
@@ -361,6 +361,7 @@ static struct vimvar
|
|||||||
{VV_NAME("hlsearch", VAR_NUMBER), 0},
|
{VV_NAME("hlsearch", VAR_NUMBER), 0},
|
||||||
{VV_NAME("oldfiles", VAR_LIST), 0},
|
{VV_NAME("oldfiles", VAR_LIST), 0},
|
||||||
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
|
{VV_NAME("windowid", VAR_NUMBER), VV_RO},
|
||||||
|
{VV_NAME("progpath", VAR_STRING), VV_RO},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* shorthand */
|
/* shorthand */
|
||||||
|
@@ -1602,6 +1602,7 @@ parse_command_name(parmp)
|
|||||||
|
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
set_vim_var_string(VV_PROGNAME, initstr, -1);
|
set_vim_var_string(VV_PROGNAME, initstr, -1);
|
||||||
|
set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (TOLOWER_ASC(initstr[0]) == 'r')
|
if (TOLOWER_ASC(initstr[0]) == 'r')
|
||||||
|
@@ -734,6 +734,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 */
|
||||||
|
/**/
|
||||||
|
234,
|
||||||
/**/
|
/**/
|
||||||
233,
|
233,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -1880,7 +1880,8 @@ typedef int proftime_T; /* dummy for function prototypes */
|
|||||||
#define VV_HLSEARCH 54
|
#define VV_HLSEARCH 54
|
||||||
#define VV_OLDFILES 55
|
#define VV_OLDFILES 55
|
||||||
#define VV_WINDOWID 56
|
#define VV_WINDOWID 56
|
||||||
#define VV_LEN 57 /* number of v: vars */
|
#define VV_PROGPATH 57
|
||||||
|
#define VV_LEN 58 /* number of v: vars */
|
||||||
|
|
||||||
#ifdef FEAT_CLIPBOARD
|
#ifdef FEAT_CLIPBOARD
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user