From 7f8374b9e6ab921e4b703c6af0e76059abc9db95 Mon Sep 17 00:00:00 2001 From: Jay Patel <36803168+jay-babu@users.noreply.github.com> Date: Mon, 5 Jun 2023 06:55:49 -0400 Subject: [PATCH] fix(scrolling): opts could be null. use astronvim.conditional_func (#259) fix: opts could be null. use astronvim.conditional_func --- .../scrolling/satellite-nvim/satellite-nvim.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lua/astrocommunity/scrolling/satellite-nvim/satellite-nvim.lua b/lua/astrocommunity/scrolling/satellite-nvim/satellite-nvim.lua index 9bcb9f188..548daa3b3 100644 --- a/lua/astrocommunity/scrolling/satellite-nvim/satellite-nvim.lua +++ b/lua/astrocommunity/scrolling/satellite-nvim/satellite-nvim.lua @@ -1,5 +1,8 @@ +local utils = require "astronvim.utils" + return { - { -- scrollbar + { + -- scrollbar "lewis6991/satellite.nvim", event = "User AstroFile", opts = { excluded_filetypes = { "prompt", "TelescopePrompt", "noice", "notify", "neo-tree" } }, @@ -10,11 +13,11 @@ return { opts = function(_, opts) local old_on_open, old_on_close = opts.on_open, opts.on_close opts.on_open = function() - old_on_open() + utils.conditional_func(old_on_open, true) vim.cmd.SatelliteDisable() end opts.on_close = function() - old_on_close() + utils.conditional_func(old_on_close, true) vim.cmd.SatelliteEnable() end end,