UI: forward 'mousefocus' option #12863

close #12849
ref eb4aab7173
This commit is contained in:
Justin M. Keyes
2020-09-06 11:40:07 -07:00
committed by GitHub
parent d6b280799f
commit c1d395a6d6
5 changed files with 11 additions and 2 deletions

View File

@@ -4022,7 +4022,6 @@ A jump table for the options with a short description can be found at |Q_op|.
*'mousefocus'* *'mousef'* *'nomousefocus'* *'nomousef'*
'mousefocus' 'mousef' boolean (default off)
global
{only works in the GUI}
The window that the mouse pointer is on is automatically activated.
When changing the window layout or window focus in another way, the
mouse pointer is moved to the window with keyboard focus. Off is the

View File

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

View File

@@ -512,6 +512,7 @@ EXTERN long p_mle; // 'modelineexpr'
EXTERN long p_mls; // 'modelines'
EXTERN char_u *p_mouse; // 'mouse'
EXTERN char_u *p_mousem; // 'mousemodel'
EXTERN long p_mousef; // 'mousefocus'
EXTERN long p_mouset; // 'mousetime'
EXTERN int p_more; // 'more'
EXTERN char_u *p_opfunc; // 'operatorfunc'

View File

@@ -1588,7 +1588,8 @@ return {
full_name='mousefocus', abbreviation='mousef',
type='bool', scope={'global'},
vi_def=true,
enable_if=false,
redraw={'ui_option'},
varname='p_mousef',
defaults={if_true={vi=false}}
},
{

View File

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