diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/autosaveonfocuslost.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/autosaveonfocuslost.lua b/plugins/autosaveonfocuslost.lua index 1a9bd0c..5dd8bce 100644 --- a/plugins/autosaveonfocuslost.lua +++ b/plugins/autosaveonfocuslost.lua @@ -11,8 +11,10 @@ local function save_node(node) local i = 1 while i <= #node.views do local view = node.views[i] - if view:is(DocView) and not view:is(CommandView) and - view.doc.filename and view.doc:is_dirty() then + if view:is(DocView) and not view:is(CommandView) + and view.doc.abs_filename ~= system.absolute_path(USERDIR .. PATHSEP .. "init.lua") + and view.doc.abs_filename ~= system.absolute_path(".lite_project.lua") + and view.doc.filename and view.doc:is_dirty() then core.log("Saving doc \"%s\"", view.doc.filename) view.doc:save() end |