fix(telescope): #7 telescope layout with functions
Props to @ranebrown for the solution. This error occured when a user has specified a function for the width value in their telescope layout_configmain
parent
0c392ddb9f
commit
db46d40d45
|
|
@ -18,6 +18,10 @@ local function search_sessions(opts)
|
||||||
or conf.layout_config[conf.layout_strategy].width
|
or conf.layout_config[conf.layout_strategy].width
|
||||||
or cols
|
or cols
|
||||||
|
|
||||||
|
if type(telescope_width) == "function" then
|
||||||
|
telescope_width = telescope_width(_, cols, _)
|
||||||
|
end
|
||||||
|
|
||||||
if telescope_width < 1 then
|
if telescope_width < 1 then
|
||||||
telescope_width = math.floor(cols * telescope_width)
|
telescope_width = math.floor(cols * telescope_width)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue