From 4db3c8f14302273b842f73a8facf1999169c1e41 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sat, 10 Jun 2023 10:05:43 +0200 Subject: [PATCH] fix(nui): nui broke noice. added a temporary work-around till the problem is solved --- lua/noice/view/nui.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/noice/view/nui.lua b/lua/noice/view/nui.lua index 38ba1837..9c75193b 100644 --- a/lua/noice/view/nui.lua +++ b/lua/noice/view/nui.lua @@ -138,6 +138,12 @@ function NuiView:create() end function NuiView:mount() + -- HACK: nui no longer re-creates the border buffer on mount, + -- which breaks in a lot of different ways, so we do it ourselves + if not (self._nui.border.bufnr and vim.api.nvim_buf_is_valid(self._nui.border.bufnr)) then + self._nui.border.bufnr = vim.api.nvim_create_buf(false, true) + end + self._nui:mount() if self._opts.close and self._opts.close.events then self._nui:on(self._opts.close.events, function()