floatwin: show error if window is closed immediately #11476

Autocmds may close window while it is being entered, then
win_set_minimal_style(wp) operates on an invalid pointer.

We could silently ignore this instead, but it is unlikely to be
intentional, so it is more useful to show an error.

fix #11383
This commit is contained in:
Justin M. Keyes
2019-11-29 23:48:14 -08:00
committed by GitHub
parent 1f684cf80a
commit f6e7857c54
4 changed files with 38 additions and 6 deletions

View File

@@ -52,10 +52,10 @@ describe('UI receives option updates', function()
local evs = {}
screen = Screen.new(20,5)
-- Override mouse_on/mouse_off handlers.
function screen._handle_mouse_on()
function screen:_handle_mouse_on()
table.insert(evs, 'mouse_on')
end
function screen._handle_mouse_off()
function screen:_handle_mouse_off()
table.insert(evs, 'mouse_off')
end
screen:attach()