073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.392
073263
Fcc: outbox
073263
From: Bram Moolenaar <Bram@moolenaar.net>
073263
Mime-Version: 1.0
073263
Content-Type: text/plain; charset=UTF-8
073263
Content-Transfer-Encoding: 8bit
073263
------------
073263
073263
Patch 7.4.392
073263
Problem:    Not easy to detect type of command line window.
073263
Solution:   Add the getcmdwintype() function. (Jacob Niehus)
073263
Files:	    src/eval.c
073263
073263
073263
*** ../vim-7.4.391/src/eval.c	2014-07-09 17:51:46.075801693 +0200
073263
--- src/eval.c	2014-08-06 13:35:59.303268990 +0200
073263
***************
073263
*** 554,559 ****
073263
--- 554,560 ----
073263
  static void f_getcmdline __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_getcmdpos __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_getcmdtype __ARGS((typval_T *argvars, typval_T *rettv));
073263
+ static void f_getcmdwintype __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_getcwd __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_getfontname __ARGS((typval_T *argvars, typval_T *rettv));
073263
  static void f_getfperm __ARGS((typval_T *argvars, typval_T *rettv));
073263
***************
073263
*** 7984,7989 ****
073263
--- 7985,7991 ----
073263
      {"getcmdline",	0, 0, f_getcmdline},
073263
      {"getcmdpos",	0, 0, f_getcmdpos},
073263
      {"getcmdtype",	0, 0, f_getcmdtype},
073263
+     {"getcmdwintype",	0, 0, f_getcmdwintype},
073263
      {"getcurpos",	0, 0, f_getcurpos},
073263
      {"getcwd",		0, 0, f_getcwd},
073263
      {"getfontname",	0, 1, f_getfontname},
073263
***************
073263
*** 11503,11508 ****
073263
--- 11505,11530 ----
073263
  }
073263
  
073263
  /*
073263
+  * "getcmdwintype()" function
073263
+  */
073263
+     static void
073263
+ f_getcmdwintype(argvars, rettv)
073263
+     typval_T	*argvars UNUSED;
073263
+     typval_T	*rettv;
073263
+ {
073263
+     rettv->v_type = VAR_STRING;
073263
+     rettv->vval.v_string = NULL;
073263
+ #ifdef FEAT_CMDWIN
073263
+     rettv->vval.v_string = alloc(2);
073263
+     if (rettv->vval.v_string != NULL)
073263
+     {
073263
+ 	rettv->vval.v_string[0] = cmdwin_type;
073263
+ 	rettv->vval.v_string[1] = NUL;
073263
+     }
073263
+ #endif
073263
+ }
073263
+ 
073263
+ /*
073263
   * "getcwd()" function
073263
   */
073263
      static void
073263
*** ../vim-7.4.391/src/version.c	2014-08-06 13:20:51.799275513 +0200
073263
--- src/version.c	2014-08-06 13:34:42.903269539 +0200
073263
***************
073263
*** 736,737 ****
073263
--- 736,739 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     392,
073263
  /**/
073263
073263
-- 
073263
I learned the customs and mannerisms of engineers by observing them, much the
073263
way Jane Goodall learned about the great apes, but without the hassle of
073263
grooming.
073263
				(Scott Adams - The Dilbert principle)
073263
073263
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
073263
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
073263
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
073263
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///