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