mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
startup: always wait for UI with --embed, unless --headless also is supplied
This commit is contained in:
@@ -330,6 +330,7 @@ local function clear(...)
|
||||
local new_args
|
||||
local env = nil
|
||||
local opts = select(1, ...)
|
||||
local headless = true
|
||||
if type(opts) == 'table' then
|
||||
if opts.env then
|
||||
local env_tbl = {}
|
||||
@@ -355,15 +356,19 @@ local function clear(...)
|
||||
end
|
||||
end
|
||||
new_args = opts.args or {}
|
||||
if opts.headless == false then
|
||||
headless = false
|
||||
end
|
||||
else
|
||||
new_args = {...}
|
||||
end
|
||||
if headless then
|
||||
table.insert(args, '--headless')
|
||||
end
|
||||
for _, arg in ipairs(new_args) do
|
||||
table.insert(args, arg)
|
||||
end
|
||||
set_session(spawn(args, nil, env))
|
||||
-- Dummy request so that --embed continues past UI initialization
|
||||
session:request('nvim_eval', "0")
|
||||
end
|
||||
|
||||
local function insert(...)
|
||||
|
||||
Reference in New Issue
Block a user