summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-08-06 13:36:59 +0200
committerBram Moolenaar <Bram@vim.org>2014-08-06 13:36:59 +0200
commit8c1329cb59e964797b8abdcf8d42af9877ea8daa (patch)
tree5bfc78ef645189150d5850c581082757898199dd
parente0f148270a03e0da2bf21706bee4d2fe99146c55 (diff)
downloadvim-8c1329cb59e964797b8abdcf8d42af9877ea8daa.zip
updated for version 7.4.392
Problem: Not easy to detect type of command line window. Solution: Add the getcmdwintype() function. (Jacob Niehus)
-rw-r--r--src/eval.c22
-rw-r--r--src/version.c2
2 files changed, 24 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c
index aedbaa4ce..4e512af64 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -554,6 +554,7 @@ static void f_getcharmod __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getcmdline __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getcmdtype __ARGS((typval_T *argvars, typval_T *rettv));
+static void f_getcmdwintype __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getcwd __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getfontname __ARGS((typval_T *argvars, typval_T *rettv));
static void f_getfperm __ARGS((typval_T *argvars, typval_T *rettv));
@@ -7984,6 +7985,7 @@ static struct fst
{"getcmdline", 0, 0, f_getcmdline},
{"getcmdpos", 0, 0, f_getcmdpos},
{"getcmdtype", 0, 0, f_getcmdtype},
+ {"getcmdwintype", 0, 0, f_getcmdwintype},
{"getcurpos", 0, 0, f_getcurpos},
{"getcwd", 0, 0, f_getcwd},
{"getfontname", 0, 1, f_getfontname},
@@ -11503,6 +11505,26 @@ f_getcmdtype(argvars, rettv)
}
/*
+ * "getcmdwintype()" function
+ */
+ static void
+f_getcmdwintype(argvars, rettv)
+ typval_T *argvars UNUSED;
+ typval_T *rettv;
+{
+ rettv->v_type = VAR_STRING;
+ rettv->vval.v_string = NULL;
+#ifdef FEAT_CMDWIN
+ rettv->vval.v_string = alloc(2);
+ if (rettv->vval.v_string != NULL)
+ {
+ rettv->vval.v_string[0] = cmdwin_type;
+ rettv->vval.v_string[1] = NUL;
+ }
+#endif
+}
+
+/*
* "getcwd()" function
*/
static void
diff --git a/src/version.c b/src/version.c
index fa2efdf4f..6610ba110 100644
--- a/src/version.c
+++ b/src/version.c
@@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 392,
+/**/
391,
/**/
390,