File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,8 @@ function list.select_next(opts)
183
183
-- end of the list
184
184
if list .selected_item_idx == # list .items then
185
185
-- preselect is not enabled, we go back to no selection
186
- if not list .get_selection_mode (list .context ).preselect then return list .select (nil , opts ) end
186
+ local select_mode = list .get_selection_mode (list .context )
187
+ if not select_mode .preselect or select_mode .auto_insert then return list .select (nil , opts ) end
187
188
188
189
-- cycling around has been disabled, ignore
189
190
if not list .config .cycle .from_bottom then return end
@@ -209,7 +210,8 @@ function list.select_prev(opts)
209
210
-- start of the list
210
211
if list .selected_item_idx == 1 then
211
212
-- auto_insert is enabled, we go back to no selection
212
- if list .get_selection_mode (list .context ).auto_insert then return list .select (nil , opts ) end
213
+ local select_mode = list .get_selection_mode (list .context )
214
+ if not select_mode .preselect or select_mode .auto_insert then return list .select (nil , opts ) end
213
215
214
216
-- cycling around has been disabled, ignore
215
217
if not list .config .cycle .from_top then return end
You can’t perform that action at this time.
0 commit comments