aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest.json2
-rw-r--r--plugins/autosave.lua5
2 files changed, 5 insertions, 2 deletions
diff --git a/manifest.json b/manifest.json
index 1b03367..7f5ce59 100644
--- a/manifest.json
+++ b/manifest.json
@@ -182,7 +182,7 @@
"id": "autosave",
"mod_version": "3",
"path": "plugins/autosave.lua",
- "version": "0.1"
+ "version": "0.2"
},
{
"description": "Automatically saves files that were changed when the main window loses focus by switching to another application",
diff --git a/plugins/autosave.lua b/plugins/autosave.lua
index b63a6f6..03d7c58 100644
--- a/plugins/autosave.lua
+++ b/plugins/autosave.lua
@@ -63,7 +63,10 @@ end
function Doc:on_text_change(type)
-- check if file is saved
- if config.plugins.autosave.enabled and self.filename then
+ if config.plugins.autosave.enabled and self.filename
+ and self.abs_filename ~= system.absolute_path(USERDIR .. PATHSEP .. "init.lua")
+ and self.abs_filename ~= system.absolute_path(".lite_project.lua")
+ then
updatepress()
end
return on_text_change(self, type)