diff --git a/lua/hardline.lua b/lua/hardline.lua index f307b7f..b542364 100644 --- a/lua/hardline.lua +++ b/lua/hardline.lua @@ -48,7 +48,7 @@ end function M.update_bufferline() local sections = {} local buffers = bufferline.get_buffers() - local separator = {class = 'bufferline', item = '|', conceal = true} + local separator = '|' for i, buffer in ipairs(buffers) do table.insert(sections, bufferline.to_section(buffer)) if i < #buffers then table.insert(sections, separator) end diff --git a/lua/hardline/common.lua b/lua/hardline/common.lua index a8f6add..2fc9bf4 100644 --- a/lua/hardline/common.lua +++ b/lua/hardline/common.lua @@ -34,10 +34,9 @@ function M.get_state(section) end if section.class == 'bufferline' then if section.conceal then return 'conceal' end - local state = {} - table.insert(state, section.current and 'current' or 'background') - if section.modified then table.insert(state, 'modified') end - return table.concat(state, '_') + local state = section.current and 'current' or 'background' + if section.modified then state = string.format('%s_modified', state) end + return state end return M.is_active() and 'active' or 'inactive' end