aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/lua/init.lua6
1 files changed, 5 insertions, 1 deletions
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.