Blame SOURCES/7.4.449

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