aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/command_entry.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/command_entry.lua')
-rw-r--r--modules/textadept/command_entry.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/textadept/command_entry.lua b/modules/textadept/command_entry.lua
index cecad02c..c1dddc5e 100644
--- a/modules/textadept/command_entry.lua
+++ b/modules/textadept/command_entry.lua
@@ -163,10 +163,10 @@ local function complete_lua()
local global_envs = not ok and
{buffer, view, ui, _G, textadept, sci.functions, sci.properties, sci.constants} or op == ':' and
{sci.functions} or {sci.properties, sci.constants}
- for _, env in ipairs(global_envs) do
- for k, v in pairs(env) do
+ for _, t in ipairs(global_envs) do
+ for k, v in pairs(t) do
if type(k) ~= 'string' or not k:find(part) then goto continue end
- local xpm = (type(v) == 'function' or env == sci.functions) and XPM.METHOD or XPM.VARIABLE
+ local xpm = (type(v) == 'function' or t == sci.functions) and XPM.METHOD or XPM.VARIABLE
cmpls[#cmpls + 1] = k .. sep .. xpm
::continue::
end