handle opts as number, #3323

This commit is contained in:
Mamrezo Zare 2022-09-16 17:09:23 +04:30 committed by Stephan Seitz
parent e7808349a5
commit 1656f67f26

View file

@ -13,9 +13,9 @@ function M.statusline(opts)
return
end
local options = opts or {}
-- if type(opts) == "number" then
-- options = { indicator_size = opts }
-- end
if type(opts) == "number" then
options = { indicator_size = opts }
end
local bufnr = options.bufnr or 0
local indicator_size = options.indicator_size or 100
local type_patterns = options.type_patterns or { "class", "function", "method" }