patch 8.0.1789: BufWinEnter does not work well for a terminal window
Problem: BufWinEnter does not work well for a terminal window.
Solution: Do not trigger BufWinEnter when opening a terminal window.
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index c3f04cc..14cf6c4 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -469,6 +469,9 @@
existing buffer. But it does happen for a
":split" with the name of the current buffer,
since it reloads that buffer.
+ Does not happen for a terminal window, because
+ it starts in Terminal-Job mode and Normal mode
+ commands won't work. Use |TerminalOpen| instead.
*BufWinLeave*
BufWinLeave Before a buffer is removed from a window.
Not when it's still visible in another window.