vim-patch:9.0.0915: WinScrolled may trigger immediately when defined

Problem:    WinScrolled may trigger immediately when defined.
Solution:   Initialize the fields in all windows. (closes vim/vim#11582)

https://github.com/vim/vim/commit/29967732761d1ffb5592db5f5aa7036f5b52abf1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-20 21:24:22 +08:00
co-authored by Bram Moolenaar
parent 035d41ac5e
commit 91c192922d
4 changed files with 61 additions and 15 deletions
@@ -104,6 +104,7 @@ describe('WinScrolled', function()
let g:scrolled = 0
au WinScrolled * let g:scrolled += 1
]])
eq(0, eval('g:scrolled'))
-- With the upper split focused, send a scroll-down event to the unfocused one.
meths.input_mouse('wheel', 'down', '', 0, 6, 0)