From 89f6ccb87b1485233e1dc00bb1340d2f147f5463 Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Sat, 1 Jun 2024 16:49:01 +0200 Subject: [PATCH] Fix switchTab usage of tabOrder --- tabview.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tabview.lua b/tabview.lua index dd22626..f1c89ec 100644 --- a/tabview.lua +++ b/tabview.lua @@ -49,7 +49,12 @@ local function switchTab() local idx = 0 if currentTab ~= nil then currentTab.window.setVisible(false) - idx = tabOrder[currentTab.name] + for i, name in pairs(tabOrder) do + if name == currentTab.name then + idx = i + break + end + end end idx = idx + 1 if idx > tabCount then