diff options
| author | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2014-09-18 20:44:36 +0900 | 
|---|---|---|
| committer | Shougo Matsushita <Shougo.Matsu@gmail.com> | 2014-09-18 20:44:36 +0900 | 
| commit | b57d6ef09a86d3cf26a3ebc0fa03a5af21bd2e27 (patch) | |
| tree | e4a2940d0227d38f8746f13d7fc9311f7f1030e7 /src/nvim/eval.c | |
| parent | a447160a6ca43181158bce8117f2af37f4e9fc85 (diff) | |
| download | rneovim-b57d6ef09a86d3cf26a3ebc0fa03a5af21bd2e27.tar.gz rneovim-b57d6ef09a86d3cf26a3ebc0fa03a5af21bd2e27.tar.bz2 rneovim-b57d6ef09a86d3cf26a3ebc0fa03a5af21bd2e27.zip | |
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
Diffstat (limited to 'src/nvim/eval.c')
| -rw-r--r-- | src/nvim/eval.c | 12 | 
1 files changed, 12 insertions, 0 deletions
| 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}, @@ -9156,6 +9157,17 @@ static void f_getcmdtype(typval_T *argvars, typval_T *rettv)  }  /* + * "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   */  static void f_getcwd(typval_T *argvars, typval_T *rettv) | 
