mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
Merge pull request #5195 from jamessan/master
Set the default value for 'packpath'
This commit is contained in:
commit
006f9c0c9c
@ -521,6 +521,8 @@ static void set_runtimepath_default(void)
|
||||
#undef SITE_SIZE
|
||||
#undef AFTER_SIZE
|
||||
set_string_default("runtimepath", rtp, true);
|
||||
// Make a copy of 'rtp' for 'packpath'
|
||||
set_string_default("packpath", rtp, false);
|
||||
xfree(data_dirs);
|
||||
xfree(config_dirs);
|
||||
xfree(data_home);
|
||||
|
@ -7,6 +7,7 @@ local execute = helpers.execute
|
||||
local clear = helpers.clear
|
||||
local eval = helpers.eval
|
||||
local eq = helpers.eq
|
||||
local neq = helpers.neq
|
||||
|
||||
local function init_session(...)
|
||||
local args = { helpers.nvim_prog, '-i', 'NONE', '--embed',
|
||||
@ -80,6 +81,19 @@ describe('startup defaults', function()
|
||||
eq(0, eval('exists("g:syntax_on")'))
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('packpath', function()
|
||||
it('defaults to &runtimepath', function()
|
||||
eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
|
||||
end)
|
||||
|
||||
it('does not follow modifications to runtimepath', function()
|
||||
meths.command('set runtimepath+=foo')
|
||||
neq(meths.get_option('runtimepath'), meths.get_option('packpath'))
|
||||
meths.command('set packpath+=foo')
|
||||
eq(meths.get_option('runtimepath'), meths.get_option('packpath'))
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
describe('XDG-based defaults', function()
|
||||
|
Loading…
Reference in New Issue
Block a user