ADD: test in doc:save(), if the file is the user module, automatically reload config

This commit is contained in:
bud 2021-02-15 22:09:25 +01:00
parent cc9aa23340
commit b9fcb6e5ae
1 changed files with 4 additions and 0 deletions

View File

@ -67,6 +67,10 @@ end
local function save(filename)
doc():save(filename)
if doc().filename == (USERDIR .. "/init.lua") then
core.reload_module("core.style")
core.load_user_directory()
end
core.log("Saved \"%s\"", doc().filename)
end