]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.234 v7.4.234
authorBram Moolenaar <Bram@vim.org>
Tue, 1 Apr 2014 17:55:49 +0000 (19:55 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 1 Apr 2014 17:55:49 +0000 (19:55 +0200)
Problem:    Can't get the command that was used to start Vim.
Solution:   Add v:progpath. (Viktor Kojouharov)

runtime/doc/eval.txt
src/eval.c
src/main.c
src/version.c
src/vim.h

index 78237ec9a4def7ee5328df1c4dcff3220538f3ef..66ee3aa2f272a30962e44937baa8e27aea0458c9 100644 (file)
@@ -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
                invoked.  Allows you to do special initialisations for |view|,
                |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.
 
                                        *v:register* *register-variable*
index d9785c4a19bebbcedd9f04df5d0db41da18fc42b..246e404bc87e1234159e4c680de8b46169a606e4 100644 (file)
@@ -361,6 +361,7 @@ static struct vimvar
     {VV_NAME("hlsearch",        VAR_NUMBER), 0},
     {VV_NAME("oldfiles",        VAR_LIST), 0},
     {VV_NAME("windowid",        VAR_NUMBER), VV_RO},
+    {VV_NAME("progpath",        VAR_STRING), VV_RO},
 };
 
 /* shorthand */
index f9bd8732ee21e97d19cdf5cd0e2127194e828fa9..c29d6be2350ce34d45a28d2dce40df82a869af14 100644 (file)
@@ -1602,6 +1602,7 @@ parse_command_name(parmp)
 
 #ifdef FEAT_EVAL
     set_vim_var_string(VV_PROGNAME, initstr, -1);
+    set_vim_var_string(VV_PROGPATH, (char_u *)parmp->argv[0], -1);
 #endif
 
     if (TOLOWER_ASC(initstr[0]) == 'r')
index 0fcea78a3372c095104c444378a26f81e77e83db..542342f3338b78bde5062ebaba7e23d71e2deb98 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    234,
 /**/
     233,
 /**/
index ac2ca3005005aa6efc3aa077b65813c45d9f7a5c..e83ea4a6ef9937caf999c2f750e341a97a3cdb16 100644 (file)
--- a/src/vim.h
+++ b/src/vim.h
@@ -1880,7 +1880,8 @@ typedef int proftime_T;       /* dummy for function prototypes */
 #define VV_HLSEARCH    54
 #define VV_OLDFILES    55
 #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