mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
defaults: set 'laststatus' to 2. #2876
This commit is contained in:
parent
7280e8c365
commit
45121a267f
@ -4052,7 +4052,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
that works for you to avoid mappings to break.
|
that works for you to avoid mappings to break.
|
||||||
|
|
||||||
*'laststatus'* *'ls'*
|
*'laststatus'* *'ls'*
|
||||||
'laststatus' 'ls' number (default 1)
|
'laststatus' 'ls' number (default 2)
|
||||||
global
|
global
|
||||||
The value of this option influences when the last window will have a
|
The value of this option influences when the last window will have a
|
||||||
status line:
|
status line:
|
||||||
|
@ -39,6 +39,7 @@ these differences.
|
|||||||
- 'hlsearch' is set by default
|
- 'hlsearch' is set by default
|
||||||
- 'incsearch' is set by default
|
- 'incsearch' is set by default
|
||||||
- 'langnoremap' is set by default
|
- 'langnoremap' is set by default
|
||||||
|
- 'laststatus' defaults to 2 (statusline is always shown)
|
||||||
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
|
- 'listchars' defaults to "tab:> ,trail:-,nbsp:+"
|
||||||
- 'mouse' defaults to "a"
|
- 'mouse' defaults to "a"
|
||||||
- 'nocompatible' is always set
|
- 'nocompatible' is always set
|
||||||
|
@ -454,6 +454,9 @@ void set_init_1(void)
|
|||||||
/* Set all options to their Vim default */
|
/* Set all options to their Vim default */
|
||||||
set_options_default(OPT_FREE);
|
set_options_default(OPT_FREE);
|
||||||
|
|
||||||
|
// set 'laststatus'
|
||||||
|
last_status(false);
|
||||||
|
|
||||||
/* Must be before option_expand(), because that one needs vim_isIDc() */
|
/* Must be before option_expand(), because that one needs vim_isIDc() */
|
||||||
didset_options();
|
didset_options();
|
||||||
|
|
||||||
@ -3662,10 +3665,9 @@ set_num_option (
|
|||||||
p_wmw = p_wiw;
|
p_wmw = p_wiw;
|
||||||
}
|
}
|
||||||
win_setminheight();
|
win_setminheight();
|
||||||
}
|
} else if (pp == &p_ls) {
|
||||||
/* (re)set last window status line */
|
/* (re)set last window status line */
|
||||||
else if (pp == &p_ls) {
|
last_status(false);
|
||||||
last_status(FALSE);
|
|
||||||
}
|
}
|
||||||
/* (re)set tab page line */
|
/* (re)set tab page line */
|
||||||
else if (pp == &p_stal) {
|
else if (pp == &p_stal) {
|
||||||
|
@ -1360,10 +1360,10 @@ return {
|
|||||||
{
|
{
|
||||||
full_name='laststatus', abbreviation='ls',
|
full_name='laststatus', abbreviation='ls',
|
||||||
type='number', scope={'global'},
|
type='number', scope={'global'},
|
||||||
vi_def=true,
|
vim=true,
|
||||||
redraw={'all_windows'},
|
redraw={'all_windows'},
|
||||||
varname='p_ls',
|
varname='p_ls',
|
||||||
defaults={if_true={vi=1}}
|
defaults={if_true={vi=1,vim=2}}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
full_name='lazyredraw', abbreviation='lz',
|
full_name='lazyredraw', abbreviation='lz',
|
||||||
|
@ -7,7 +7,7 @@ local Session = require('nvim.session')
|
|||||||
|
|
||||||
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
|
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
|
||||||
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
|
local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
|
||||||
'--cmd', 'set shortmess+=I background=light noswapfile noautoindent',
|
'--cmd', 'set shortmess+=I background=light noswapfile noautoindent laststatus=1',
|
||||||
'--embed'}
|
'--embed'}
|
||||||
|
|
||||||
-- Formulate a path to the directory containing nvim. We use this to
|
-- Formulate a path to the directory containing nvim. We use this to
|
||||||
|
@ -1,8 +1,50 @@
|
|||||||
local helpers = require('test.functional.helpers')
|
local helpers = require('test.functional.helpers')
|
||||||
local Screen = require('test.functional.ui.screen')
|
local Screen = require('test.functional.ui.screen')
|
||||||
local clear, feed, execute = helpers.clear, helpers.feed, helpers.execute
|
local spawn, set_session, clear = helpers.spawn, helpers.set_session, helpers.clear
|
||||||
|
local feed, execute = helpers.feed, helpers.execute
|
||||||
local insert, wait = helpers.insert, helpers.wait
|
local insert, wait = helpers.insert, helpers.wait
|
||||||
|
|
||||||
|
describe('Initial screen', function()
|
||||||
|
local screen
|
||||||
|
local nvim_argv = {helpers.nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
|
||||||
|
'--cmd', 'set shortmess+=I background=light noswapfile',
|
||||||
|
'--embed'}
|
||||||
|
|
||||||
|
before_each(function()
|
||||||
|
if session then
|
||||||
|
session:exit(0)
|
||||||
|
end
|
||||||
|
local screen_nvim = spawn(nvim_argv)
|
||||||
|
set_session(screen_nvim)
|
||||||
|
screen = Screen.new()
|
||||||
|
screen:attach()
|
||||||
|
screen:set_default_attr_ignore( {{bold=true, foreground=255}} )
|
||||||
|
end)
|
||||||
|
|
||||||
|
after_each(function()
|
||||||
|
screen:detach()
|
||||||
|
end)
|
||||||
|
|
||||||
|
it('is the default initial screen', function()
|
||||||
|
screen:expect([[
|
||||||
|
^ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
~ |
|
||||||
|
[No Name] |
|
||||||
|
|
|
||||||
|
]])
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
describe('Screen', function()
|
describe('Screen', function()
|
||||||
local screen
|
local screen
|
||||||
|
|
||||||
@ -102,7 +144,6 @@ describe('Screen', function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
describe('window', function()
|
describe('window', function()
|
||||||
describe('split', function()
|
describe('split', function()
|
||||||
it('horizontal', function()
|
it('horizontal', function()
|
||||||
|
Loading…
Reference in New Issue
Block a user