aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/textadept/run.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index 2935a56a..e03665cb 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -58,6 +58,7 @@ compile_command = {}
-- @see compile_command
function compile()
if not buffer.filename then return end
+ buffer:save()
local action = compile_command[buffer.filename:match('[^.]+$')]
if action then execute(type(action) == 'function' and action() or action) end
end
@@ -77,6 +78,7 @@ run_command = {}
-- @see run_command
function run()
if not buffer.filename then return end
+ buffer:save()
local action = run_command[buffer.filename:match('[^.]+$')]
if action then execute(type(action) == 'function' and action() or action) end
end