mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
refactor: reorganize option header files (#25437)
- Move vimoption_T to option.h - option_defs.h is for option-related types - option_vars.h corresponds to Vim's option.h - option_defs.h and option_vars.h don't include each other
This commit is contained in:
@@ -4,10 +4,10 @@ local itp = helpers.gen_itp(it)
|
||||
local to_cstr = helpers.to_cstr
|
||||
local eq = helpers.eq
|
||||
|
||||
local option = helpers.cimport("./src/nvim/optionstr.h")
|
||||
local optionstr = helpers.cimport("./src/nvim/optionstr.h")
|
||||
|
||||
local check_ff_value = function(ff)
|
||||
return option.check_ff_value(to_cstr(ff))
|
||||
return optionstr.check_ff_value(to_cstr(ff))
|
||||
end
|
||||
|
||||
describe('check_ff_value', function()
|
||||
|
||||
@@ -22,10 +22,6 @@ local endswith = helpers.endswith
|
||||
local NODE_NORMAL = 0
|
||||
local NODE_WRITABLE = 1
|
||||
|
||||
cimport('./src/nvim/os/shell.h')
|
||||
cimport('./src/nvim/option_defs.h')
|
||||
cimport('./src/nvim/main.h')
|
||||
cimport('./src/nvim/fileio.h')
|
||||
local fs = cimport('./src/nvim/os/os.h', './src/nvim/path.h')
|
||||
cppimport('sys/stat.h')
|
||||
cppimport('fcntl.h')
|
||||
|
||||
@@ -2,7 +2,7 @@ local helpers = require('test.unit.helpers')(after_each)
|
||||
local itp = helpers.gen_itp(it)
|
||||
local cimported = helpers.cimport(
|
||||
'./src/nvim/os/shell.h',
|
||||
'./src/nvim/option_defs.h',
|
||||
'./src/nvim/option_vars.h',
|
||||
'./src/nvim/main.h',
|
||||
'./src/nvim/memory.h'
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ local mkdir = helpers.mkdir
|
||||
|
||||
cimport('string.h')
|
||||
local cimp = cimport('./src/nvim/os/os.h', './src/nvim/path.h')
|
||||
local options = cimport('./src/nvim/option_defs.h')
|
||||
local options = cimport('./src/nvim/option_vars.h')
|
||||
|
||||
local length = 0
|
||||
local buffer = nil
|
||||
|
||||
@@ -11,10 +11,7 @@ local neq = helpers.neq
|
||||
local eq = helpers.eq
|
||||
local mkdir = helpers.mkdir
|
||||
|
||||
cimport('./src/nvim/ex_cmds_defs.h')
|
||||
cimport('./src/nvim/buffer_defs.h')
|
||||
local options = cimport('./src/nvim/option_defs.h')
|
||||
-- TODO: remove: local vim = cimport('./src/nvim/vim.h')
|
||||
local options = cimport('./src/nvim/option_vars.h')
|
||||
local undo = cimport('./src/nvim/undo.h')
|
||||
local buffer = cimport('./src/nvim/buffer.h')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user