Skip to content

Commit

Permalink
use nvim's internal numbering for tab index
Browse files Browse the repository at this point in the history
  • Loading branch information
plax-00 committed Jan 9, 2024
1 parent a62eaff commit 70dcc6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/cokeline/tabs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 70dcc6f

Please sign in to comment.