[doc-patch] Regarding the behaviour of closing help windows

21 views
Skip to first unread message

Christian Brabandt

unread,
Oct 18, 2019, 5:20:29 AM10/18/19
to vim...@vim.org
Bram,
a question on vi.stackexchange.com came up, why closing the help window
triggered several autocommands. Therefore I propose the following doc
patch:

diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt
index ce73f8c55..efbaf338b 100644
--- a/runtime/doc/helphelp.txt
+++ b/runtime/doc/helphelp.txt
@@ -103,6 +103,10 @@ Help on help files *helphelp*

*:helpc* *:helpclose*
:helpc[lose] Close one help window, if there is one.
+ Vim will try to restore the window layout (including
+ cursor position) to the same layout it was before
+ opening the help window initially. This might cause
+ triggering autocommands several times.

*:helpg* *:helpgrep*
:helpg[rep] {pattern}[@xx]
diff --git a/runtime/doc/windows.txt b/runtime/doc/windows.txt
index d999962b9..12fa3099b 100644
--- a/runtime/doc/windows.txt
+++ b/runtime/doc/windows.txt
@@ -312,6 +312,8 @@ CTRL-W CTRL-Q *CTRL-W_CTRL-Q*
:+quit " quit the next window
:+2quit " quit the second next window
<
+ When closing help windows, Vim will try to restore the previous
+ window layout |:helpclose|.
:q[uit]!
:{count}q[uit]!
Without {count}: Quit the current window. If {count} is



Best,
Christian
--
Hundert, Andi:
ziemlich alter Uhrgroßvater

Bram Moolenaar

unread,
Oct 18, 2019, 4:10:25 PM10/18/19
to vim...@googlegroups.com, Christian Brabandt, vim...@vim.org

Christian wrote:

> a question on vi.stackexchange.com came up, why closing the help window
> triggered several autocommands. Therefore I propose the following doc
> patch:

I'll include it, thanks.

--
To keep milk from turning sour: Keep it in the cow.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages