File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -157,14 +157,16 @@ cmp.select_and_accept = function()
157
157
vim .schedule (function ()
158
158
-- select an item if none is selected
159
159
if not cmp .windows .autocomplete .get_selected_item () then cmp .windows .autocomplete .select_next () end
160
+
160
161
local item = cmp .windows .autocomplete .get_selected_item ()
161
162
if item ~= nil then require (' blink.cmp.accept' )(item ) end
162
163
end )
163
164
return true
164
165
end
165
166
166
167
cmp .select_prev = function ()
167
- if not cmp .windows .autocomplete .win :is_open () and not cmp .windows .autocomplete .auto_show then
168
+ if not cmp .windows .autocomplete .win :is_open () then
169
+ if cmp .windows .autocomplete .auto_show then return end
168
170
cmp .show ()
169
171
return true
170
172
end
@@ -173,7 +175,8 @@ cmp.select_prev = function()
173
175
end
174
176
175
177
cmp .select_next = function ()
176
- if not cmp .windows .autocomplete .win :is_open () and not cmp .windows .autocomplete .auto_show then
178
+ if not cmp .windows .autocomplete .win :is_open () then
179
+ if cmp .windows .autocomplete .auto_show then return end
177
180
cmp .show ()
178
181
return true
179
182
end
You can’t perform that action at this time.
0 commit comments