From 6def33c0123fe26443a4a68dec04616a4b48f278 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 1 Jul 2020 00:12:36 -0400 Subject: Only save before compile/run if the buffer has been modified. Auto-saving interferes with commands that read file modification times. --- modules/textadept/run.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 77cad2d0..6397d627 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -183,7 +183,7 @@ end local function compile_or_run(filename, commands) if filename == buffer.filename then buffer:annotation_clear_all() - buffer:save() + if buffer.modify then buffer:save() end end local ext = filename:match('[^/\\.]+$') local lexer = filename == buffer.filename and buffer:get_lexer() or -- cgit v1.2.3