Skip to content

Commit

Permalink
fix(tabs): use custom separator_style in tabpages (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucobellic committed Jun 25, 2024
1 parent 1662fed commit 81820ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lua/bufferline/tabpages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ local padding = constants.padding

local function tab_click_component(num) return "%" .. num .. "T" end

---@param tabpage { tabnr: number, variables: { name: string }, windows: number[] }
---@param is_active boolean
---@param style string | { [1]: string, [2]: string }
---@param highlights bufferline.Highlights
local function render(tabpage, is_active, style, highlights)
local h = highlights
local hl = is_active and h.tab_selected.hl_group or h.tab.hl_group
local separator_hl = is_active and h.tab_separator_selected.hl_group or h.tab_separator.hl_group
local chars = constants.sep_chars[style] or constants.sep_chars.thin
local chars = type(style) == "table" and style or constants.sep_chars[style] or constants.sep_chars.thin
local name = padding .. (tabpage.variables.name or tabpage.tabnr) .. padding
local char_order = ({ thick = { 1, 2 }, thin = { 1, 2 } })[style] or { 2, 1 }
return {
Expand Down

0 comments on commit 81820ca

Please # to comment.