feat(ui-ext): make 'mousemoveevent' a ui_option

This commit is contained in:
zeertzjq
2022-07-24 11:32:56 +08:00
parent 00b49dd8dd
commit a5fe7940c8
3 changed files with 9 additions and 0 deletions

View File

@ -207,6 +207,7 @@ the editor.
'guifontwide'
'linespace'
'mousefocus'
'mousemoveevent'
'pumblend'
'showtabline'
'termguicolors'

View File

@ -1625,6 +1625,7 @@ return {
full_name='mousemoveevent', abbreviation='mousemev',
short_desc=N_("deliver mouse move events to input queue"),
type='bool', scope={'global'},
redraw={'ui_option'},
varname='p_mousemev',
defaults={if_true=false}
},

View File

@ -19,6 +19,7 @@ describe('UI receives option updates', function()
linespace=0,
pumblend=0,
mousefocus=false,
mousemoveevent=false,
showtabline=1,
termguicolors=false,
ttimeout=true,
@ -131,6 +132,12 @@ describe('UI receives option updates', function()
eq(expected, screen.options)
end)
command("set mousemoveevent")
expected.mousemoveevent = true
screen:expect(function()
eq(expected, screen.options)
end)
command("set nottimeout")
expected.ttimeout = false
screen:expect(function()