From d6b971aa29fa8a1ad18652e1c5eea82c14bc0d52 Mon Sep 17 00:00:00 2001 From: otherJL0 Date: Tue, 22 Mar 2022 09:16:26 -0400 Subject: [PATCH] Creating helper function --- lua/catppuccin/core/integrations/feline.lua | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lua/catppuccin/core/integrations/feline.lua b/lua/catppuccin/core/integrations/feline.lua index 6a76054..3b82f4d 100644 --- a/lua/catppuccin/core/integrations/feline.lua +++ b/lua/catppuccin/core/integrations/feline.lua @@ -62,6 +62,15 @@ local mode_colors = { local shortline = false +local function is_enabled(is_shortline, winid, min_width) + if is_shortline then + return true + end + + winid = winid or 0 + return vim.api.nvim_win_get_width(winid) > min_width +end + -- Initialize the components table local components = { active = {},