Skip to content

Commit

Permalink
fix: Old preview autocmd
Browse files Browse the repository at this point in the history
  • Loading branch information
hedyhli committed Nov 27, 2023
1 parent dc942d0 commit 8df3742
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/outline/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ local function setup_global_autocmd()
end
vim.api.nvim_create_autocmd('WinEnter', {
pattern = '*',
callback = require('outline.preview').close,
callback = function()
local s = M._get_sidebar()
if s and s.preview then
s.preview:close()
end
end,
})
vim.api.nvim_create_autocmd('TabClosed', {
pattern = '*',
Expand Down

0 comments on commit 8df3742

Please sign in to comment.