feat(ui-ext): make 'mousehide' into proper ui_option (#25532)

This commit is contained in:
Jaehoon Hwang 2023-10-09 01:48:24 -07:00 committed by GitHub
parent f96f8566b5
commit dacd34364f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 0 deletions

View File

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

View File

@ -571,6 +571,7 @@ EXTERN char *p_mouse; ///< 'mouse'
EXTERN char *p_mousem; ///< 'mousemodel'
EXTERN int p_mousemev; ///< 'mousemoveevent'
EXTERN int p_mousef; ///< 'mousefocus'
EXTERN int p_mh; ///< 'mousehide'
EXTERN char *p_mousescroll; ///< 'mousescroll'
EXTERN OptInt p_mousescroll_vert INIT(= MOUSESCROLL_VERT_DFLT);
EXTERN OptInt p_mousescroll_hor INIT(= MOUSESCROLL_HOR_DFLT);

View File

@ -5452,9 +5452,11 @@ return {
]=],
enable_if = false,
full_name = 'mousehide',
redraw = { 'ui_option' },
scope = { 'global' },
short_desc = N_('hide mouse pointer while typing'),
type = 'bool',
varname = 'p_mh',
},
{
abbreviation = 'mousem',

View File

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