aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancesco Abbate <francesco.bbt@gmail.com>2020-12-16 14:06:03 +0100
committerFrancesco Abbate <francesco.bbt@gmail.com>2020-12-16 14:06:03 +0100
commit26f3eb73adf678526d0ec35ea556df89461e96a4 (patch)
tree79753a830e17f1b74d88abe0cab0064912c81083
parenteae34e5b7863bf5fa0db3bf133fb9b2b667266fd (diff)
downloadlite-xl-plugins-26f3eb73adf678526d0ec35ea556df89461e96a4.tar.gz
lite-xl-plugins-26f3eb73adf678526d0ec35ea556df89461e96a4.zip
Fix workspace plugin to work with core:restart
-rw-r--r--plugins/workspace.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/workspace.lua b/plugins/workspace.lua
index 028e0a2..822291b 100644
--- a/plugins/workspace.lua
+++ b/plugins/workspace.lua
@@ -152,10 +152,10 @@ function core.run(...)
if #core.docs == 0 then
core.try(load_workspace)
- local exit = os.exit
- function os.exit(...)
+ local original_on_quit = core.on_quit
+ function core.on_quit()
save_workspace()
- exit(...)
+ original_on_quit()
end
end