summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-09-19 19:39:34 +0200
committerBram Moolenaar <Bram@vim.org>2014-09-19 19:39:34 +0200
commit5bfa2ed6e47a2bc4e15e43cf6504e97401f2e5e6 (patch)
tree754dd26f767690e7118d91b21d647df66f25572e
parent4ee40b051545c3749d9d215f3500977792d6db72 (diff)
downloadvim-git-5bfa2ed6e47a2bc4e15e43cf6504e97401f2e5e6.tar.gz
updated for version 7.4.449v7.4.449
Problem: Can't easily close the help window. (Chris Gaal) Solution: Add ":helpclose". (Christian Brabandt)
-rw-r--r--runtime/doc/helphelp.txt3
-rw-r--r--runtime/doc/index.txt1
-rw-r--r--src/ex_cmds.c18
-rw-r--r--src/ex_cmds.h2
-rw-r--r--src/proto/ex_cmds.pro1
-rw-r--r--src/version.c2
6 files changed, 27 insertions, 0 deletions
diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index 87f095e56..e7d281a91 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -96,6 +96,9 @@ Help on help files *helphelp*
find a tag in a file with the same language as the
current file. See |help-translated|.
+ *:helpc* *:helpclose*
+:helpc[lose] Close one help window.
+
*:helpg* *:helpgrep*
:helpg[rep] {pattern}[@xx]
Search all help text files and make a list of lines
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt
index cda17681f..d16ad9a40 100644
--- a/runtime/doc/index.txt
+++ b/runtime/doc/index.txt
@@ -1244,6 +1244,7 @@ tag command action ~
|:gvim| :gv[im] start the GUI
|:hardcopy| :ha[rdcopy] send text to the printer
|:help| :h[elp] open a help window
+|:helpclose| :helpc[lose] close one help window
|:helpfind| :helpf[ind] dialog to open a help window
|:helpgrep| :helpg[rep] like ":grep" but searches help files
|:helptags| :helpt[ags] generate help tags for a directory
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 2a81eb739..4ae996c94 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5899,6 +5899,24 @@ erret:
vim_free(tag);
}
+/*
+ * ":helpclose": Close the help window
+ */
+ void
+ex_helpclose(eap)
+ exarg_T *eap UNUSED;
+{
+ win_T *win;
+
+ FOR_ALL_WINDOWS(win)
+ {
+ if (win->w_buffer->b_help)
+ {
+ win_close(win, FALSE);
+ break;
+ }
+ }
+}
#if defined(FEAT_MULTI_LANG) || defined(PROTO)
/*
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 41d3a642d..f3007c934 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -417,6 +417,8 @@ EX(CMD_gvim, "gvim", ex_gui,
BANG|FILES|EDITCMD|ARGOPT|TRLBAR|CMDWIN),
EX(CMD_help, "help", ex_help,
BANG|EXTRA|NOTRLCOM),
+EX(CMD_helpclose, "helpclose", ex_helpclose,
+ RANGE|NOTADR|COUNT|TRLBAR),
EX(CMD_helpfind, "helpfind", ex_helpfind,
EXTRA|NOTRLCOM),
EX(CMD_helpgrep, "helpgrep", ex_helpgrep,
diff --git a/src/proto/ex_cmds.pro b/src/proto/ex_cmds.pro
index a94f5d048..8757637c0 100644
--- a/src/proto/ex_cmds.pro
+++ b/src/proto/ex_cmds.pro
@@ -44,6 +44,7 @@ void write_viminfo_sub_string __ARGS((FILE *fp));
void free_old_sub __ARGS((void));
int prepare_tagpreview __ARGS((int undo_sync));
void ex_help __ARGS((exarg_T *eap));
+void ex_helpclose __ARGS((exarg_T *eap));
char_u *check_help_lang __ARGS((char_u *arg));
int help_heuristic __ARGS((char_u *matched_string, int offset, int wrong_case));
int find_help_tags __ARGS((char_u *arg, int *num_matches, char_u ***matches, int keep_lang));
diff --git a/src/version.c b/src/version.c
index 7007e884d..83dfeaa36 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 449,
+/**/
448,
/**/
447,