From 0ef3ec8c3e47f26f5b7a64a146b80b9f64cf4584 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 21 Jan 2009 10:23:54 -0500 Subject: Bugfixes in modules/textadept/run.lua If buffer.shows_errors, double-click should go to the error as well. Also, if the buffer's filename doesn't exist, don't Run or Compile it. --- modules/textadept/run.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 8edf3ef6..1d9842a5 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -90,6 +90,7 @@ local compile_for_ext = { -- Compiles the file as specified by its extension in the compile_for_ext table. -- @see compile_for_ext function compile() + if not buffer.filename then return end local ext = buffer.filename:match('[^.]+$') local action = compile_for_ext[ext] if not action then return end @@ -120,6 +121,7 @@ local go_for_ext = { -- Runs/executes the file as specified by its extension in the go_for_ext table. -- @see go_for_ext function go() + if not buffer.filename then return end local ext = buffer.filename:match('[^.]+$') local action = go_for_ext[ext] if not action then return end @@ -177,7 +179,7 @@ local error_details = { -- @param line_num The line double-clicked. -- @see error_details function goto_error(pos, line_num) - if buffer.shows_messages then + if buffer.shows_messages or buffer.shows_errors then line = buffer:get_line(line_num) for _, error_detail in pairs(error_details) do local captures = { line:match(error_detail.pattern) } -- cgit v1.2.3