From ddcc45f0615ab6ba776635a15e2183f8d50401a7 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Tue, 10 Feb 2009 10:24:56 -0500 Subject: Moved the textadept.locale table into the globals table. --- modules/textadept/run.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'modules/textadept/run.lua') 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 mitchellcaladbolg.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 -- cgit v1.2.3