diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-11-20 08:38:46 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2022-11-20 21:11:37 +0800 |
commit | 035d41ac5e5fcbb49eb64b72a924c4d6f89f0579 (patch) | |
tree | 4f461e40c21bfe0e3ec488f91c55d599b317681d /runtime | |
parent | 822eabc5e123bca71ba945467c3b01110bb0e003 (diff) | |
download | rneovim-035d41ac5e5fcbb49eb64b72a924c4d6f89f0579.tar.gz rneovim-035d41ac5e5fcbb49eb64b72a924c4d6f89f0579.tar.bz2 rneovim-035d41ac5e5fcbb49eb64b72a924c4d6f89f0579.zip |
vim-patch:partial:9.0.0913: only change in current window triggers the WinScrolled event
Problem: Only a change in the current window triggers the WinScrolled
event.
Solution: Trigger WinScrolled if any window scrolled or changed size.
(issue vim/vim#11576)
https://github.com/vim/vim/commit/0a60f79fd0c328b47b36279a95282e9f8d9e7512
Skip locking of window layout and E1312.
Copy the latest version of all WinScrolled tests from Vim.
Note: patch 9.0.0915 is needed for the Lua tests to pass.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/autocmd.txt | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index c30c190301..b6c9253a41 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1096,22 +1096,35 @@ 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. ============================================================================== 6. Patterns *autocmd-pattern* *{aupat}* -The {aupat} argument of `:autocmd` can be a comma-separated list. This works -as if the command was given with each pattern separately. Thus this command: > +The {aupat} argument of `:autocmd` can be a comma-separated list. This works as +if the command was given with each pattern separately. Thus this command: > :autocmd BufRead *.txt,*.info set et Is equivalent to: > :autocmd BufRead *.txt set et |