Fix malloc error
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user