Skip to content

Commit

Permalink
chore: close win before deleting buf
Browse files Browse the repository at this point in the history
  • Loading branch information
b0o committed Jan 25, 2024
1 parent 32cf855 commit 0dd24a5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lua/incline/winline.lua
Original file line number Diff line number Diff line change
Expand Up @@ -297,12 +297,12 @@ function Winline:blur()
end

function Winline:destroy()
if self._buf and a.nvim_buf_is_valid(self._buf) then
a.nvim_buf_delete(self._buf, { unload = false })
end
if self._win and a.nvim_win_is_valid(self._win) then
a.nvim_win_close(self._win, false)
end
if self._buf and a.nvim_buf_is_valid(self._buf) then
a.nvim_buf_delete(self._buf, { unload = false })
end
end

local function make(target_win)
Expand Down

0 comments on commit 0dd24a5

Please sign in to comment.