blob: dcad4ecc3e186d936187211189b16284f26f378a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
-- mod-version:4
local core = require "core"
local config = require "core.config"
local command = require "core.command"
local Doc = require "core.doc"
local common = require "core.common"
config.plugins.autorestart = common.merge({
}, config.plugins.autorestart)
local save = Doc.save
Doc.save = function(self, ...)
local res = save(self, ...)
if self.abs_filename == USERDIR .. PATHSEP .. "init.lua" or self.abs_filename == core.root_project().path .. PATHSEP .. ".lite_project" then
command.perform("core:restart")
end
return res
end
|