Skip to content

Commit 8e0b8b8

Browse files
committed
fix(tabline): The tabs component now shows windows of the specific tab instead of all tabs
1 parent 5ae59c2 commit 8e0b8b8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lua/bars/components/tabline.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,14 @@ tlC.tabs = function (config)
138138
utils.create_segmant(tab_config.padding_left, tab_config.padding_left_hl or tab_config.hl),
139139

140140
utils.create_segmant(tab_config.icon, tab_config.icon_hl),
141-
utils.create_segmant(tab, tab_config.hl)
141+
utils.create_segmant(tostring(tab), tab_config.hl)
142142
});
143143

144144
if type(tab_config.win_count) == "string" then
145145
local wins = vim.api.nvim_tabpage_list_wins(tab);
146+
wins = vim.tbl_filter(function (win)
147+
return vim.api.nvim_win_get_tabpage(win) == tab;
148+
end, wins);
146149

147150
_o = table.concat({
148151
_o,

0 commit comments

Comments
 (0)