aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-05-07 15:00:39 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-05-07 15:00:39 -0400
commitd8c61a6a451bb70efaee7b83e753de904b277ba4 (patch)
tree6891ddef4b04a61e8fe7035b97ba7f0a958ab728
parent3a35dd10a9adaceb8dabb715481791bfc723d789 (diff)
downloadtextadept-d8c61a6a451bb70efaee7b83e753de904b277ba4.tar.gz
textadept-d8c61a6a451bb70efaee7b83e753de904b277ba4.zip
Save buffer before compiling or running; modules/textadept/run.lua
-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