Skip to content

Commit 826ec90

Browse files
authored
Update util.lua
Bugfix for lua implement
1 parent 93ffba4 commit 826ec90

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lua/easycomplete/util.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ function util.complete_menu_filter(matching_res, word)
129129
end
130130
end
131131

132-
if vim.fn["easycomplete#GetStuntMenuItems"]() == 0 and vim.g.easycomplete_first_complete_hit == 1 then
132+
local stunt_items = vim.fn["easycomplete#GetStuntMenuItems"]()
133+
134+
if #stunt_items == 0 and vim.g.easycomplete_first_complete_hit == 1 then
133135
table.sort(fuzzymatch_result, function(a, b)
134136
return #a.abbr < #b.abbr -- 按 abbr 字段的长度升序排序
135137
end)

0 commit comments

Comments
 (0)