File tree 1 file changed +6
-2
lines changed 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ local function run_async_lua(buf_text, callback)
72
72
73
73
local cancelled = false
74
74
local pos = 1
75
+ local all_words = {}
76
+
75
77
local function next_chunk ()
76
78
if cancelled then return end
77
79
@@ -93,11 +95,13 @@ local function run_async_lua(buf_text, callback)
93
95
94
96
local chunk_text = string.sub (buf_text , start_pos , end_pos )
95
97
local chunk_words = require (' blink.cmp.fuzzy' ).get_words (chunk_text )
96
- local words = require ( ' blink.cmp.lib.utils ' ). deduplicate ( chunk_words )
98
+ vim . list_extend ( all_words , chunk_words )
97
99
98
100
-- next iter
99
101
if pos < total_length then return vim .schedule (next_chunk ) end
100
- -- or finish
102
+
103
+ -- Deduplicate and finish
104
+ local words = require (' blink.cmp.lib.utils' ).deduplicate (all_words )
101
105
vim .schedule (function () callback (words_to_items (words )) end )
102
106
end
103
107
You can’t perform that action at this time.
0 commit comments