diff options
author | 2009-02-10 10:24:56 -0500 | |
---|---|---|
committer | 2009-02-10 10:24:56 -0500 | |
commit | ddcc45f0615ab6ba776635a15e2183f8d50401a7 (patch) | |
tree | 958e817be2c18db9005db29ddcbdeeb72350d77e /modules/textadept/run.lua | |
parent | 59c9eb6528d1759bc2734150cb3d99ec2e3eab5b (diff) | |
download | textadept-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.lua | 7 |
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 |