feat(:restart): v:starttime, v:exitreason #39319

This commit is contained in:
Justin M. Keyes
2026-04-22 14:58:47 -04:00
committed by GitHub
parent c407e3e67b
commit fd1b193d51
16 changed files with 265 additions and 117 deletions

View File

@@ -42,10 +42,10 @@ M.restart_canonical_addr = nil ---@type string?
--- Windows named pipes can't be rebound immediately, so the new server starts on a
--- temporary bootstrap address and polls until the canonical address is reclaimable.
--- @param canonical_addr string The original --listen address to reclaim.
--- @param bootstrap_addr string Temporary address the new server started on.
--- @param expected_uis integer Number of UIs expected to reattach (0 = don't wait).
function M.rebind_old_addr_after_restart(canonical_addr, bootstrap_addr, expected_uis)
function M.rebind_after_restart(canonical_addr, expected_uis)
M.restart_canonical_addr = canonical_addr
local bootstrap_addr = vim.v.servername -- Temporary autogenerated address.
local poll_ms = 50
local max_wait_ms = 30000
local timer = assert(vim.uv.new_timer())