refactor(nvim): simplify std_condition
for statuscolumn
This commit is contained in:
parent
01c16211ed
commit
d6a21aac2b
@ -25,15 +25,7 @@ return {
|
|||||||
})
|
})
|
||||||
|
|
||||||
local std_condition = function(args)
|
local std_condition = function(args)
|
||||||
local buf_opt = function(option_name)
|
return #vim.api.nvim_get_option_value("bufhidden", { buf = args.buf }) == 0
|
||||||
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"))
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user