aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/run.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-02-10 10:24:56 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-02-10 10:24:56 -0500
commitddcc45f0615ab6ba776635a15e2183f8d50401a7 (patch)
tree958e817be2c18db9005db29ddcbdeeb72350d77e /modules/textadept/run.lua
parent59c9eb6528d1759bc2734150cb3d99ec2e3eab5b (diff)
downloadtextadept-ddcc45f0615ab6ba776635a15e2183f8d50401a7.tar.gz
textadept-ddcc45f0615ab6ba776635a15e2183f8d50401a7.zip
Moved the textadept.locale table into the globals table.
Diffstat (limited to 'modules/textadept/run.lua')
-rw-r--r--modules/textadept/run.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index 147c8055..8923eeb6 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -1,6 +1,7 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local textadept = _G.textadept
+local locale = _G.locale
---
-- Module for running/executing source files.
@@ -179,8 +180,8 @@ local error_details = {
-- @param line_num The line double-clicked.
-- @see error_details
function goto_error(pos, line_num)
- local locale = textadept.locale
- if buffer._type == locale.MESSAGE_BUFFER or buffer._type == 'error_buffer' then
+ local type = buffer._type
+ if type == locale.MESSAGE_BUFFER or type == locale.ERROR_BUFFER then
line = buffer:get_line(line_num)
for _, error_detail in pairs(error_details) do
local captures = { line:match(error_detail.pattern) }
@@ -194,7 +195,7 @@ function goto_error(pos, line_num)
if msg then buffer:call_tip_show(buffer.current_pos, msg) end
else
error(string.format(
- textadept.locale.M_TEXTADEPT_RUN_FILE_DOES_NOT_EXIST, filename))
+ locale.M_TEXTADEPT_RUN_FILE_DOES_NOT_EXIST, filename))
end
break
end