File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -245,11 +245,13 @@ local function mini_pick_ui(opts)
245245 end
246246
247247 mini_pick .start ({
248- window = opts .width and {
249- config = {
250- width = opts .width + 2 , -- extra space for mini.pick UI
251- },
252- } or nil ,
248+ window = opts .width
249+ and {
250+ config = {
251+ width = opts .width + 2 , -- extra space for mini.pick UI
252+ },
253+ }
254+ or nil ,
253255 source = {
254256 items = items ,
255257 name = opts .title ,
@@ -271,7 +273,16 @@ local function snacks_picker_ui(opts)
271273
272274 local snack_opts = {
273275 title = opts .title ,
274- layout = { preset = ' select' , width = opts .width or nil },
276+ layout = {
277+ preset = ' select' ,
278+ config = function (layout )
279+ local width = opts .width and (opts .width + 3 ) or nil -- extra space for snacks UI
280+ layout .layout .width = width
281+ layout .layout .max_width = width
282+ layout .layout .min_width = width
283+ return layout
284+ end ,
285+ },
275286 finder = function ()
276287 return opts .items
277288 end ,
You can’t perform that action at this time.
0 commit comments