I modified it a little bit. Since Skillet has 3 sub-categories and as written, it always puts the main category at the bottom. I added an offset value so that once expanded, Skillet and its sub-categories were always on the screen.
Lua Code:
local function ScrollToCategory(panelName,offset)
local idx = 0
InterfaceOptionsFrameAddOnsListScrollBar:SetValue(0)
for i,cat in ipairs(INTERFACEOPTIONS_ADDONCATEGORIES) do
if not cat.hidden then
idx = idx + 1
if cat.name == panelName then
break
end
end
end
local numbuttons = #(InterfaceOptionsFrameAddOns.buttons)
if idx and numbuttons and idx > numbuttons then
local btnHeight = InterfaceOptionsFrameAddOns.buttons[1]:GetHeight()
InterfaceOptionsFrameAddOnsListScrollBar:SetValue((offset+idx-numbuttons)*btnHeight)
end
end
I guess the code should worry about setting a value that exceeds the maximum.