fix: nil error with Alpha on buffers component
This commit is contained in:
parent
904f9df637
commit
cdc574c9b0
|
@ -385,6 +385,7 @@ sections = {
|
|||
dashboard = 'Dashboard',
|
||||
packer = 'Packer',
|
||||
fzf = 'FZF',
|
||||
alpha = 'Alpha'
|
||||
}, -- shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } )
|
||||
buffers_color = {
|
||||
active = nil, -- color for active buffer
|
||||
|
|
|
@ -364,6 +364,7 @@ Component specific local options ~
|
|||
dashboard = 'Dashboard',
|
||||
packer = 'Packer',
|
||||
fzf = 'FZF',
|
||||
alpha = 'Alpha'
|
||||
}, -- shows specific buffer name for that filetype ( { `filetype` = `buffer_name`, ... } )
|
||||
buffers_color = {
|
||||
active = nil, -- color for active buffer
|
||||
|
|
|
@ -12,6 +12,7 @@ local default_options = {
|
|||
dashboard = 'Dashboard',
|
||||
packer = 'Packer',
|
||||
fzf = 'FZF',
|
||||
alpha = 'Alpha',
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -197,12 +198,16 @@ function Buffers:update_status()
|
|||
b.current = true
|
||||
if self.options.self.section < 'lualine_x' then
|
||||
b.last = true
|
||||
if #buffers > 0 then
|
||||
buffers[#buffers].last = nil
|
||||
end
|
||||
buffers[#buffers + 1] = b
|
||||
current = #buffers
|
||||
else
|
||||
b.first = true
|
||||
if #buffers > 0 then
|
||||
buffers[1].first = nil
|
||||
end
|
||||
table.insert(buffers, 1, b)
|
||||
current = 1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue