From 0dd24a5fa4d5c1149dbf80da70fb00b12d880e11 Mon Sep 17 00:00:00 2001 From: Maddison Hellstrom Date: Wed, 24 Jan 2024 21:41:58 -0800 Subject: [PATCH] chore: close win before deleting buf --- lua/incline/winline.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/incline/winline.lua b/lua/incline/winline.lua index 201ce58..8de93ab 100644 --- a/lua/incline/winline.lua +++ b/lua/incline/winline.lua @@ -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)