Use doc on_save hooks to reload user module

This commit is contained in:
Francesco Abbate committed 2021-02-17 20:10:39 +01:00
1 parent 1ce1c114ba
commit 9b27180267
2 files changed
+23 -4

No files matched your search

+1 -4
View File
@@ -67,10 +67,7 @@ end
local function save(filename)
doc():save(filename)
if doc().filename == common.normalize_path(USERDIR .. PATHSEP .. "init.lua") then
core.reload_module("core.style")
core.load_user_directory()
end
core.on_doc_save(filename)
core.log("Saved \"%s\"", doc().filename)
end