summaryrefslogtreecommitdiffstats
path: root/src/evalfunc.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-02-14 14:32:22 +0100
committerBram Moolenaar <Bram@vim.org>2020-02-14 14:32:22 +0100
commit00f3b4e007af07870168bf044cecc9d544483953 (patch)
treedebd23a51f44608cb926dd1616babd1934be10b5 /src/evalfunc.c
parent0a8fed6231c84e4e1b3a7dd6c0d95d3f98207fe0 (diff)
patch 8.2.0257: cannot recognize a terminal in a popup windowv8.2.0257
Problem: Cannot recognize a terminal in a popup window. Solution: Add the win_gettype() function.
Diffstat (limited to 'src/evalfunc.c')
-rw-r--r--src/evalfunc.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/evalfunc.c b/src/evalfunc.c
index b4009f0aef..a0f29943ec 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -86,7 +86,6 @@ static void f_garbagecollect(typval_T *argvars, typval_T *rettv);
static void f_get(typval_T *argvars, typval_T *rettv);
static void f_getchangelist(typval_T *argvars, typval_T *rettv);
static void f_getcharsearch(typval_T *argvars, typval_T *rettv);
-static void f_getcmdwintype(typval_T *argvars, typval_T *rettv);
static void f_getenv(typval_T *argvars, typval_T *rettv);
static void f_getfontname(typval_T *argvars, typval_T *rettv);
static void f_getjumplist(typval_T *argvars, typval_T *rettv);
@@ -845,6 +844,7 @@ static funcentry_T global_functions[] =
{"win_execute", 2, 3, FEARG_2, &t_string, f_win_execute},
{"win_findbuf", 1, 1, FEARG_1, &t_list_number, f_win_findbuf},
{"win_getid", 0, 2, FEARG_1, &t_number, f_win_getid},
+ {"win_gettype", 0, 1, FEARG_1, &t_string, f_win_gettype},
{"win_gotoid", 1, 1, FEARG_1, &t_number, f_win_gotoid},
{"win_id2tabwin", 1, 1, FEARG_1, &t_list_number, f_win_id2tabwin},
{"win_id2win", 1, 1, FEARG_1, &t_number, f_win_id2win},
@@ -2920,24 +2920,6 @@ f_getcharsearch(typval_T *argvars UNUSED, typval_T *rettv)
}
/*
- * "getcmdwintype()" function
- */
- static void
-f_getcmdwintype(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
-}
-
-/*
* "getenv()" function
*/
static void