ui: forward 'linespace' option #7883

ref #7520
This commit is contained in:
Justin M. Keyes
2018-01-21 07:31:57 +01:00
parent ada1956206
commit eb4aab7173
5 changed files with 19 additions and 3 deletions

View File

@@ -3676,7 +3676,7 @@ A jump table for the options with a short description can be found at |Q_op|.
< Minimum value is 2, maximum value is 1000.
*'linespace'* *'lsp'*
'linespace' 'lsp' number (default 0, 1 for Win32 GUI)
'linespace' 'lsp' number (default 0)
global
{only in the GUI}
Number of pixel lines inserted between characters. Useful if the font

View File

@@ -90,6 +90,7 @@ Global Events *ui-global*
'guifont'
'guifontset'
'guifontwide'
'linespace'
'showtabline'
'termguicolors'

View File

@@ -481,6 +481,7 @@ EXTERN char_u *p_langmap; // 'langmap'
EXTERN int p_lnr; // 'langnoremap'
EXTERN int p_lrm; // 'langremap'
EXTERN char_u *p_lm; // 'langmenu'
EXTERN long *p_linespace; // 'linespace'
EXTERN char_u *p_lispwords; // 'lispwords'
EXTERN long p_ls; // 'laststatus'
EXTERN long p_stal; // 'showtabline'

View File

@@ -1399,8 +1399,9 @@ return {
full_name='linespace', abbreviation='lsp',
type='number', scope={'global'},
vi_def=true,
redraw={'everything'},
enable_if=false,
redraw={'everything', 'ui_option'},
varname='p_linespace',
defaults={if_true={vi=0}}
},
{
full_name='lisp',

View File

@@ -24,6 +24,7 @@ describe('ui receives option updates', function()
guifont='',
guifontset='',
guifontwide='',
linespace=0,
showtabline=1,
termguicolors=false,
}
@@ -58,6 +59,18 @@ describe('ui receives option updates', function()
eq(changed, screen.options)
end)
command("set linespace=13")
changed.linespace = 13
screen:expect(function()
eq(changed, screen.options)
end)
command("set linespace=-11")
changed.linespace = -11
screen:expect(function()
eq(changed, screen.options)
end)
command("set all&")
screen:expect(function()
eq(defaults, screen.options)