From a5790e42bb64bd6405f4fde010a3c17efd02d005 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Mon, 27 Jun 2011 23:18:48 -0400 Subject: Fixed bug introduced by stripping '_G' in Lua Adeptsense; modules/lua/init.lua --- modules/lua/init.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/lua/init.lua') diff --git a/modules/lua/init.lua b/modules/lua/init.lua index f689867f..83527685 100644 --- a/modules/lua/init.lua +++ b/modules/lua/init.lua @@ -71,7 +71,11 @@ sense:load_ctags(_HOME..'/modules/lua/tags', true) -- Strips '_G' from symbols since it's implied. function sense:get_class(symbol) - return self.super.get_class(self, symbol:gsub('_G%.?', '')) + if symbol:find('^_G') then + symbol = symbol:gsub('_G%.?', '') + if symbol == '' then return '' end + end + return self.super.get_class(self, symbol) end -- Shows an autocompletion list for the symbol behind the caret. -- cgit v1.2.3