]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.449 v7.4.449
authorBram Moolenaar <Bram@vim.org>
Fri, 19 Sep 2014 17:39:34 +0000 (19:39 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 19 Sep 2014 17:39:34 +0000 (19:39 +0200)
Problem:    Can't easily close the help window. (Chris Gaal)
Solution:   Add ":helpclose". (Christian Brabandt)

runtime/doc/helphelp.txt
runtime/doc/index.txt
src/ex_cmds.c
src/ex_cmds.h
src/proto/ex_cmds.pro
src/version.c

index 87f095e56d77c640ea5b837ce3b0f96c040c4a6b..e7d281a9150ffce3874d5ccbf8b7fa2d669a730c 100644 (file)
@@ -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
index cda17681fd86a956b0e597ab1e06e576db9aa601..d16ad9a4072b4dca8a28ab90fc4678f875eef0a9 100644 (file)
@@ -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
index 2a81eb739895a749c0a9a447763a9a7ead9d639a..4ae996c94483e5efc9c23582fc5feca0a84b71e7 100644 (file)
@@ -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)
 /*
index 41d3a642d39d76b619587770991276824430bf98..f3007c934744531f8a6ce38c7e932156e87889e0 100644 (file)
@@ -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,
index a94f5d048686b0c98b93e203aa9110e8f480b630..8757637c0abf90d8ef3306e3f6ff99a1f8a6d13f 100644 (file)
@@ -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));
index 7007e884dd6b902b6e1fddaf3cd51729eda82c73..83dfeaa36d3f68c4de5f0d22c207611eb5b3d68e 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    449,
 /**/
     448,
 /**/