aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorRohan Vashisht <81112205+RohanVashisht1234@users.noreply.github.com>2024-04-08 16:18:48 +0530
committerGitHub <noreply@github.com>2024-04-08 12:48:48 +0200
commitb303b64cffd4dcc81db469fdd0985182a16e9083 (patch)
tree46949c49643826eb048636e99dcc3da8d823b481 /plugins
parent8fde5e902632712579802ed0464ebc1120fb2355 (diff)
downloadlite-xl-plugins-b303b64cffd4dcc81db469fdd0985182a16e9083.tar.gz
lite-xl-plugins-b303b64cffd4dcc81db469fdd0985182a16e9083.zip
Don't run `autosave` on user and project modules (#419)
* Update autosave.lua * Update autosave.lua * Update autosave.lua * Update manifest.json
Diffstat (limited to 'plugins')
-rw-r--r--plugins/autosave.lua5
1 files changed, 4 insertions, 1 deletions
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)