From b303b64cffd4dcc81db469fdd0985182a16e9083 Mon Sep 17 00:00:00 2001 From: Rohan Vashisht <81112205+RohanVashisht1234@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:18:48 +0530 Subject: Don't run `autosave` on user and project modules (#419) * Update autosave.lua * Update autosave.lua * Update autosave.lua * Update manifest.json --- manifest.json | 2 +- plugins/autosave.lua | 5 ++++- 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) -- cgit v1.2.3