refactor(nvim): simplify std_condition for statuscolumn

This commit is contained in:
Price Hiller 2024-04-19 04:48:59 -05:00
parent 01c16211ed
commit d6a21aac2b
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -25,15 +25,7 @@ return {
})
local std_condition = function(args)
local buf_opt = function(option_name)
local value = vim.api.nvim_get_option_value(option_name, { buf = args.buf })
if value == "" then
return nil
else
return value
end
end
return (not buf_opt("bufhidden"))
return #vim.api.nvim_get_option_value("bufhidden", { buf = args.buf }) == 0
end
return {