073263
To: vim_dev@googlegroups.com
073263
Subject: Patch 7.4.449
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.449
073263
Problem:    Can't easily close the help window. (Chris Gaal)
073263
Solution:   Add ":helpclose". (Christian Brabandt)
073263
Files:	    runtime/doc/helphelp.txt, runtime/doc/index.txt, src/ex_cmds.c,
073263
	    src/ex_cmds.h, src/proto/ex_cmds.pro
073263
073263
073263
*** ../vim-7.4.448/runtime/doc/helphelp.txt	2013-08-10 13:24:54.000000000 +0200
073263
--- runtime/doc/helphelp.txt	2014-09-19 19:38:11.110445851 +0200
073263
***************
073263
*** 96,101 ****
073263
--- 96,104 ----
073263
  			find a tag in a file with the same language as the
073263
  			current file.  See |help-translated|.
073263
  
073263
+ 						 	*:helpc* *:helpclose*
073263
+ :helpc[lose]            Close one help window.
073263
+ 
073263
  							*:helpg* *:helpgrep*
073263
  :helpg[rep] {pattern}[@xx]
073263
  			Search all help text files and make a list of lines
073263
*** ../vim-7.4.448/runtime/doc/index.txt	2013-08-10 13:24:56.000000000 +0200
073263
--- runtime/doc/index.txt	2014-09-19 19:38:23.694445878 +0200
073263
***************
073263
*** 1244,1249 ****
073263
--- 1244,1250 ----
073263
  |:gvim|		:gv[im]		start the GUI
073263
  |:hardcopy|	:ha[rdcopy]	send text to the printer
073263
  |:help|		:h[elp]		open a help window
073263
+ |:helpclose|	:helpc[lose]	close one help window
073263
  |:helpfind|	:helpf[ind]	dialog to open a help window
073263
  |:helpgrep|	:helpg[rep]	like ":grep" but searches help files
073263
  |:helptags|	:helpt[ags]	generate help tags for a directory
073263
*** ../vim-7.4.448/src/ex_cmds.c	2014-08-29 09:02:23.886399246 +0200
073263
--- src/ex_cmds.c	2014-09-19 19:33:43.350445266 +0200
073263
***************
073263
*** 5899,5904 ****
073263
--- 5899,5922 ----
073263
      vim_free(tag);
073263
  }
073263
  
073263
+ /*
073263
+  * ":helpclose": Close the help window
073263
+  */
073263
+     void
073263
+ ex_helpclose(eap)
073263
+     exarg_T	*eap UNUSED;
073263
+ {
073263
+     win_T *win;
073263
+ 
073263
+     FOR_ALL_WINDOWS(win)
073263
+     {
073263
+ 	if (win->w_buffer->b_help)
073263
+ 	{
073263
+ 	    win_close(win, FALSE);
073263
+ 	    break;
073263
+ 	}
073263
+     }
073263
+ }
073263
  
073263
  #if defined(FEAT_MULTI_LANG) || defined(PROTO)
073263
  /*
073263
*** ../vim-7.4.448/src/ex_cmds.h	2014-03-23 16:03:56.163311626 +0100
073263
--- src/ex_cmds.h	2014-09-19 19:21:09.134443618 +0200
073263
***************
073263
*** 417,422 ****
073263
--- 417,424 ----
073263
  			BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN),
073263
  EX(CMD_help,		"help",		ex_help,
073263
  			BANG|EXTRA|NOTRLCOM),
073263
+ EX(CMD_helpclose,	"helpclose",	ex_helpclose,
073263
+ 			RANGE|NOTADR|COUNT|TRLBAR),
073263
  EX(CMD_helpfind,	"helpfind",	ex_helpfind,
073263
  			EXTRA|NOTRLCOM),
073263
  EX(CMD_helpgrep,	"helpgrep",	ex_helpgrep,
073263
*** ../vim-7.4.448/src/proto/ex_cmds.pro	2013-08-10 13:37:09.000000000 +0200
073263
--- src/proto/ex_cmds.pro	2014-09-19 19:21:09.134443618 +0200
073263
***************
073263
*** 44,49 ****
073263
--- 44,50 ----
073263
  void free_old_sub __ARGS((void));
073263
  int prepare_tagpreview __ARGS((int undo_sync));
073263
  void ex_help __ARGS((exarg_T *eap));
073263
+ void ex_helpclose __ARGS((exarg_T *eap));
073263
  char_u *check_help_lang __ARGS((char_u *arg));
073263
  int help_heuristic __ARGS((char_u *matched_string, int offset, int wrong_case));
073263
  int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches, int keep_lang));
073263
*** ../vim-7.4.448/src/version.c	2014-09-19 16:13:48.358419065 +0200
073263
--- src/version.c	2014-09-19 18:06:13.718433799 +0200
073263
***************
073263
*** 743,744 ****
073263
--- 743,746 ----
073263
  {   /* Add new patch number below this line */
073263
+ /**/
073263
+     449,
073263
  /**/
073263
073263
-- 
073263
hundred-and-one symptoms of being an internet addict:
073263
165. You have a web page burned into your glasses
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    ///