From d6a21aac2b982516783d25c0afd49450df480999 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Fri, 19 Apr 2024 04:48:59 -0500 Subject: [PATCH] refactor(nvim): simplify `std_condition` for statuscolumn --- dots/.config/nvim/lua/plugins/configs/statuscol.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/dots/.config/nvim/lua/plugins/configs/statuscol.lua b/dots/.config/nvim/lua/plugins/configs/statuscol.lua index 09f9e1fa..2b8c6dc7 100644 --- a/dots/.config/nvim/lua/plugins/configs/statuscol.lua +++ b/dots/.config/nvim/lua/plugins/configs/statuscol.lua @@ -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 {