aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-01-21 10:23:54 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-01-21 10:23:54 -0500
commit0ef3ec8c3e47f26f5b7a64a146b80b9f64cf4584 (patch)
tree75bf799515e08ffc700519abbf4b6e2e94d23ba0 /modules
parentf31e0c7fe39794bec4cdb8cb0886137190800fe9 (diff)
downloadtextadept-0ef3ec8c3e47f26f5b7a64a146b80b9f64cf4584.tar.gz
textadept-0ef3ec8c3e47f26f5b7a64a146b80b9f64cf4584.zip
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.
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/run.lua4
1 files changed, 3 insertions, 1 deletions
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) }