From 1e17904eb2fbb33070125dec9c3b06df06655b25 Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Tue, 23 Dec 2014 11:35:25 +0100 Subject: vim-patch:7.4.449 Problem: Can't easily close the help window. (Chris Gaal) Solution: Add ":helpclose". (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-449 --- runtime/doc/helphelp.txt | 3 +++ runtime/doc/index.txt | 1 + src/nvim/ex_cmds.c | 12 ++++++++++++ src/nvim/ex_cmds.lua | 5 +++++ src/nvim/version.c | 2 +- 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index 87f095e56d..52b61394e3 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 01ec37b5a0..a4d25681ca 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1242,6 +1242,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/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index a8d2f5589e..1880cfeb78 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5644,6 +5644,18 @@ struct sign static sign_T *first_sign = NULL; static int next_sign_typenr = 1; +/* + * ":helpclose": Close the help window + */ +void ex_helpclose(exarg_T *eap) +{ + FOR_ALL_WINDOWS_IN_TAB(win, curtab) { + if (win->w_buffer->b_help) { + win_close(win, FALSE); + break; + } + } +} static char *cmds[] = { "define", diff --git a/src/nvim/ex_cmds.lua b/src/nvim/ex_cmds.lua index 5cd69232aa..d5d6d39616 100644 --- a/src/nvim/ex_cmds.lua +++ b/src/nvim/ex_cmds.lua @@ -840,6 +840,11 @@ return { flags=bit.bor(BANG, EXTRA, NOTRLCOM), func='ex_help', }, + { + command='helpclose', + flags=bit.bor(RANGE, NOTADR, COUNT, TRLBAR), + func='ex_helpclose', + }, { command='helpfind', flags=bit.bor(EXTRA, NOTRLCOM), diff --git a/src/nvim/version.c b/src/nvim/version.c index cd11dfe1d0..586400e5de 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -288,7 +288,7 @@ static int included_patches[] = { //452, //451, //450, - //449, + 449, //448 NA //447, //446, -- cgit From c4e0cd4418f5f6699d341446e791d05f9406a6bc Mon Sep 17 00:00:00 2001 From: Florian Walch Date: Tue, 23 Dec 2014 12:12:16 +0100 Subject: vim-patch:7.4.452 Problem: Can't build with tiny features. (Tony Mechelynck) Solution: Use "return" instead of "break". https://code.google.com/p/vim/source/detail?r=v7-4-452 --- src/nvim/ex_cmds.c | 4 ++-- src/nvim/version.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 1880cfeb78..3278de3561 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5645,14 +5645,14 @@ static sign_T *first_sign = NULL; static int next_sign_typenr = 1; /* - * ":helpclose": Close the help window + * ":helpclose": Close one help window */ void ex_helpclose(exarg_T *eap) { FOR_ALL_WINDOWS_IN_TAB(win, curtab) { if (win->w_buffer->b_help) { win_close(win, FALSE); - break; + return; } } } diff --git a/src/nvim/version.c b/src/nvim/version.c index 586400e5de..2324104d4f 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -285,7 +285,7 @@ static int included_patches[] = { 455, 454, //453 NA - //452, + 452, //451, //450, 449, -- cgit