fix(config): properly handle uis connecting after startup

This commit is contained in:
Folke Lemaitre 2023-01-07 09:12:51 +01:00
parent 457e65eec8
commit 5ed89b5a0d
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040
4 changed files with 28 additions and 26 deletions

View file

@ -65,7 +65,7 @@ function M.report(notify)
end
end
end
if #lines > 0 and notify and Config.options.checker.notify then
if #lines > 0 and notify and Config.options.checker.notify and not Config.headless() then
table.insert(lines, 1, "# Plugin Updates")
Util.info(lines)
end

View file

@ -75,7 +75,7 @@ function M.check(start)
if not (start or #changes == 0) then
vim.schedule(function()
if Config.options.change_detection.notify then
if Config.options.change_detection.notify and not Config.headless() then
local lines = { "# Config Change Detected. Reloading...", "" }
for _, change in ipairs(changes) do
table.insert(lines, "- **" .. change.what .. "**: `" .. vim.fn.fnamemodify(change.file, ":p:~:.") .. "`")