Blame SOURCES/7.4.392

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