diff --git a/lua/cokeline/tabs.lua b/lua/cokeline/tabs.lua index 7029dbe..75a158d 100644 --- a/lua/cokeline/tabs.lua +++ b/lua/cokeline/tabs.lua @@ -93,7 +93,8 @@ function M.fetch_tabs() table.sort(tabnrs, function(a, b) return a < b end) - for t, tabnr in ipairs(tabnrs) do + for _, tabnr in ipairs(tabnrs) do + local t = vim.api.nvim_tabpage_get_number(tabnr) if state.tab_lookup[tabnr] ~= nil then tabs[t] = state.tab_lookup[tabnr] tabs[t].is_active = tabnr == active_tab