Use get_word instead to sort.

This commit is contained in:
hrsh7th
2022-03-31 11:16:53 +09:00
parent c1d0cd0fc5
commit a97d2f46f0

View File

@@ -145,8 +145,8 @@ compare.locality = setmetatable({
end
}, {
__call = function(self, entry1, entry2)
local local1 = self.locality_map[entry1:get_completion_item().label]
local local2 = self.locality_map[entry2:get_completion_item().label]
local local1 = self.locality_map[entry1:get_word()]
local local2 = self.locality_map[entry2:get_word()]
if local1 ~= local2 then
if local1 == nil then
return false
@@ -209,8 +209,8 @@ compare.scopes = setmetatable({
end,
}, {
__call = function(self, entry1, entry2)
local local1 = self.scopes_map[entry1:get_completion_item().label]
local local2 = self.scopes_map[entry2:get_completion_item().label]
local local1 = self.scopes_map[entry1:get_word()]
local local2 = self.scopes_map[entry2:get_word()]
if local1 ~= local2 then
if local1 == nil then
return false