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)

2996773276

Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
zeertzjq
2022-11-20 21:11:57 +08:00
parent 035d41ac5e
commit 91c192922d
4 changed files with 61 additions and 15 deletions

View File

@@ -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)