Skip to content

Commit

Permalink
fix: clear images when closing a twin window
Browse files Browse the repository at this point in the history
  • Loading branch information
3rd committed Oct 17, 2023
1 parent a3e0b9f commit bd95cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/image/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ api.setup = function(options)
local group = vim.api.nvim_create_augroup("image.nvim", { clear = true })

-- auto-clear on buffer / window close
vim.api.nvim_create_autocmd("BufLeave", {
vim.api.nvim_create_autocmd({ "BufLeave", "WinClosed" }, {
group = group,
callback = function() -- auto-clear images when windows and buffers change
vim.schedule(function()
Expand Down

0 comments on commit bd95cc9

Please sign in to comment.