From b57d6ef09a86d3cf26a3ebc0fa03a5af21bd2e27 Mon Sep 17 00:00:00 2001 From: Shougo Matsushita Date: Thu, 18 Sep 2014 20:44:36 +0900 Subject: vim-patch:7.4.392 Problem: Not easy to detect type of command line window. Solution: Add the getcmdwintype() function. (Jacob Niehus) https://code.google.com/p/vim/source/detail?r=v7-4-392 --- src/nvim/eval.c | 12 ++++++++++++ src/nvim/version.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 760457b54e..871f15c576 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -6388,6 +6388,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}, @@ -9155,6 +9156,17 @@ static void f_getcmdtype(typval_T *argvars, typval_T *rettv) rettv->vval.v_string[0] = get_cmdline_type(); } +/* + * "getcmdwintype()" function + */ +static void f_getcmdwintype(typval_T *argvars, typval_T *rettv) +{ + rettv->v_type = VAR_STRING; + rettv->vval.v_string = NULL; + rettv->vval.v_string = xmallocz(1); + rettv->vval.v_string[0] = cmdwin_type; +} + /* * "getcwd()" function */ diff --git a/src/nvim/version.c b/src/nvim/version.c index fa96b27341..da2b3630d9 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -203,7 +203,7 @@ static int included_patches[] = { //395, //394, //393, - //392, + 392, //391, //390, //389, -- cgit