diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-11-19 21:18:11 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-11-19 21:18:11 +0000 |
commit | 0a60f79fd0c328b47b36279a95282e9f8d9e7512 (patch) | |
tree | 770ca1ec430efa0379f9bec4e3b50153d5f23041 /runtime | |
parent | c896adbcdee8b2296433a61c1f009aae9f68a594 (diff) |
patch 9.0.0913: only change in current window triggers the WinScrolled eventv9.0.0913
Problem: Only a change in the current window triggers the WinScrolled
event.
Solution: Trigger WinScrolled if any window scrolled or changed size.
(issue #11576)
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/autocmd.txt | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 5051cc3dc0..86ae60f67d 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1372,16 +1372,32 @@ WinNew When a new window was created. Not done for *WinScrolled* WinScrolled After scrolling the content of a window or - resizing a window. - The pattern is matched against the - |window-ID|. Both <amatch> and <afile> are - set to the |window-ID|. - Non-recursive (the event cannot trigger - itself). However, if the command causes the - window to scroll or change size another + resizing a window in the current tab page. + + When more than one window scrolled or resized + only one WinScrolled event is triggered. You + can use the `winlayout()` and `getwininfo()` + functions to see what changed. + + The pattern is matched against the |window-ID| + of the first window that scrolled or resized. + Both <amatch> and <afile> are set to the + |window-ID|. + + Only starts triggering after startup finished + and the first screen redraw was done. + + Non-recursive: the event will not trigger + while executing commands for the WinScrolled + event. However, if the command causes a + window to scroll or change size, then another WinScrolled event will be triggered later. + Does not trigger when the command is added, only after the first scroll or resize. + *E1312* + It is not allowed to change the window layout + here (split, close or move windows). ============================================================================== 6. Patterns *autocmd-patterns* *{aupat}* |