Skip to content

Commit

Permalink
fix(scrolling): opts could be null. use astronvim.conditional_func (#259
Browse files Browse the repository at this point in the history
)

fix: opts could be null. use astronvim.conditional_func
  • Loading branch information
jay-babu authored Jun 5, 2023
1 parent abd7777 commit 7f8374b
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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" } },
Expand All @@ -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,
Expand Down

0 comments on commit 7f8374b

Please sign in to comment.