mirror of
https://github.com/hrsh7th/nvim-cmp
synced 2024-09-16 20:54:03 +02:00
fix: one more item than max_item_count is displayed (#1811)
This commit is contained in:
parent
538e37ba87
commit
04e0ca376d
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ view.open = function(self, ctx, sources)
|
|||
-- filter by max_item_count.
|
||||
for _, e in ipairs(group_entries) do
|
||||
if max_item_counts[e.source.name] ~= nil then
|
||||
if max_item_counts[e.source.name] >= 0 then
|
||||
if max_item_counts[e.source.name] > 0 then
|
||||
max_item_counts[e.source.name] = max_item_counts[e.source.name] - 1
|
||||
table.insert(entries, e)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue