Blame SOURCES/7.4.392

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