summaryrefslogtreecommitdiffstats
path: root/runtime/doc/autocmd.txt
diff options
context:
space:
mode:
authorSergey Vlasov <sergey@vlasov.me>2024-01-25 23:07:00 +0100
committerChristian Brabandt <cb@256bit.org>2024-01-25 23:07:00 +0100
commit1f47db75fdc8c53c5c778b26ecfa0942ac801f22 (patch)
tree3e08bda69c9a77e744431b723f6e50fb74b06955 /runtime/doc/autocmd.txt
parent92e90a1e102825aa9149262cacfc991264db05df (diff)
patch 9.1.0059: No event triggered before creating a windowv9.1.0059
Problem: No event is triggered before creating a window. (Sergey Vlasov) Solution: Add the WinNewPre event (Sergey Vlasov) fixes: #10635 closes: #12761 Signed-off-by: Sergey Vlasov <sergey@vlasov.me> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'runtime/doc/autocmd.txt')
-rw-r--r--runtime/doc/autocmd.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt
index 1641361791..5f9f51ecb6 100644
--- a/runtime/doc/autocmd.txt
+++ b/runtime/doc/autocmd.txt
@@ -1,4 +1,4 @@
-*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 23
+*autocmd.txt* For Vim version 9.1. Last change: 2024 Jan 25
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -381,6 +381,7 @@ Name triggered by ~
|CursorMoved| the cursor was moved in Normal mode
|CursorMovedI| the cursor was moved in Insert mode
+|WinNewPre| before creating a new window
|WinNew| after creating a new window
|TabNew| after creating a new tab page
|WinClosed| after closing a window
@@ -1390,6 +1391,18 @@ WinLeave Before leaving a window. If the window to be
WinLeave autocommands (but not for ":new").
Not used for ":qa" or ":q" when exiting Vim.
+ *WinNewPre*
+WinNewPre Before creating a new window. Triggered
+ before commands that modify window layout by
+ creating a split or new tab page. Not done for
+ the first window, when Vim has just started.
+ It is not allowed to modify window layout
+ while executing commands for the WinNewPre
+ event.
+ Most useful to store current window layout
+ and compare it with the new layout after the
+ Window has been created.
+
*WinNew*
WinNew When a new window was created. Not done for
the first window, when Vim has just started.