mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
fix(mouse): fix using uninitialized memory with K_MOUSEMOVE (#19480)
Fix a mistake in the porting of Vim patch 8.0.1309.
This commit is contained in:
@@ -365,7 +365,7 @@ static struct mousetable {
|
|||||||
{ (int)KE_X2DRAG, MOUSE_X2, false, true },
|
{ (int)KE_X2DRAG, MOUSE_X2, false, true },
|
||||||
{ (int)KE_X2RELEASE, MOUSE_X2, false, false },
|
{ (int)KE_X2RELEASE, MOUSE_X2, false, false },
|
||||||
// DRAG without CLICK
|
// DRAG without CLICK
|
||||||
{ (int)K_MOUSEMOVE, MOUSE_RELEASE, false, true },
|
{ (int)KE_MOUSEMOVE, MOUSE_RELEASE, false, true },
|
||||||
// RELEASE without CLICK
|
// RELEASE without CLICK
|
||||||
{ (int)KE_IGNORE, MOUSE_RELEASE, false, false },
|
{ (int)KE_IGNORE, MOUSE_RELEASE, false, false },
|
||||||
{ 0, 0, 0, 0 },
|
{ 0, 0, 0, 0 },
|
||||||
|
@@ -1590,4 +1590,10 @@ describe('ui/mouse/input', function()
|
|||||||
eq(0, meths.get_var('mouse_up3'))
|
eq(0, meths.get_var('mouse_up3'))
|
||||||
eq(0, meths.get_var('mouse_up4'))
|
eq(0, meths.get_var('mouse_up4'))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
it('feeding <MouseMove> does not use uninitialized memory #19480', function()
|
||||||
|
feed('<MouseMove>')
|
||||||
|
helpers.poke_eventloop()
|
||||||
|
helpers.assert_alive()
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
|
Reference in New Issue
Block a user