patch 8.1.2017: cannot execute commands after closing the cmdline window
Problem: Cannot execute commands after closing the cmdline window.
Solution: Also trigger BufEnter and WinEnter. (closes #4762)
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 7893651..aa28362 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -554,16 +554,14 @@
*CmdwinEnter*
CmdwinEnter After entering the command-line window.
Useful for setting options specifically for
- this special type of window. This is
- triggered _instead_ of BufEnter and WinEnter.
+ this special type of window.
<afile> is set to a single character,
indicating the type of command-line.
|cmdwin-char|
*CmdwinLeave*
CmdwinLeave Before leaving the command-line window.
Useful to clean up any global setting done
- with CmdwinEnter. This is triggered _instead_
- of BufLeave and WinLeave.
+ with CmdwinEnter.
<afile> is set to a single character,
indicating the type of command-line.
|cmdwin-char|
diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt
index 22b4e6f..a3aeb18 100644
--- a/runtime/doc/cmdline.txt
+++ b/runtime/doc/cmdline.txt
@@ -1171,11 +1171,9 @@
AUTOCOMMANDS
-Two autocommand events are used: |CmdwinEnter| and |CmdwinLeave|. Since this
-window is of a special type, the WinEnter, WinLeave, BufEnter and BufLeave
-events are not triggered. You can use the Cmdwin events to do settings
-specifically for the command-line window. Be careful not to cause side
-effects!
+Two autocommand events are used: |CmdwinEnter| and |CmdwinLeave|. You can use
+the Cmdwin events to do settings specifically for the command-line window.
+Be careful not to cause side effects!
Example: >
:au CmdwinEnter : let b:cpt_save = &cpt | set cpt=.
:au CmdwinLeave : let &cpt = b:cpt_save