fix: buffers component crash on unlisted buffers
Seems like get_buf_option doesn't work on unlosted buffers. reverting back to using fn.buflisted() fixes #532
This commit is contained in:
parent
02e1f6cd5b
commit
52725d2ca8
|
@ -66,7 +66,7 @@ function M:update_status()
|
||||||
local data = {}
|
local data = {}
|
||||||
local buffers = {}
|
local buffers = {}
|
||||||
for b = 1, vim.fn.bufnr('$') do
|
for b = 1, vim.fn.bufnr('$') do
|
||||||
if vim.api.nvim_buf_get_option(b, 'buflisted') and vim.api.nvim_buf_get_option(b, 'buftype') ~= 'quickfix' then
|
if vim.fn.buflisted(b) ~= 0 and vim.api.nvim_buf_get_option(b, 'buftype') ~= 'quickfix' then
|
||||||
buffers[#buffers + 1] = Buffer({ bufnr = b, options = self.options, highlights = self.highlights })
|
buffers[#buffers + 1] = Buffer({ bufnr = b, options = self.options, highlights = self.highlights })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue