fix: call a slow function in a fast event context (#2424)
This commit is contained in:
@@ -59,13 +59,14 @@ function M.get_system_info()
|
|||||||
local os_version = vim.loop.os_uname().release
|
local os_version = vim.loop.os_uname().release
|
||||||
local os_machine = vim.loop.os_uname().machine
|
local os_machine = vim.loop.os_uname().machine
|
||||||
local lang = os.getenv("LANG")
|
local lang = os.getenv("LANG")
|
||||||
|
local shell = os.getenv("SHELL")
|
||||||
|
|
||||||
local res = string.format(
|
local res = string.format(
|
||||||
"- Platform: %s-%s-%s\n- Shell: %s\n- Language: %s\n- Current date: %s",
|
"- Platform: %s-%s-%s\n- Shell: %s\n- Language: %s\n- Current date: %s",
|
||||||
os_name,
|
os_name,
|
||||||
os_version,
|
os_version,
|
||||||
os_machine,
|
os_machine,
|
||||||
vim.o.shell,
|
shell,
|
||||||
lang,
|
lang,
|
||||||
os.date("%Y-%m-%d")
|
os.date("%Y-%m-%d")
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user