From d387021598610971445f8a99cbff13bbc0202a11 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 4 Apr 2022 19:17:31 +0800 Subject: [PATCH] fix(notify): check `win_is_open` before close notify --- autoload/SpaceVim/api/notify.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/SpaceVim/api/notify.vim b/autoload/SpaceVim/api/notify.vim index 5134999c6..f5177d4fc 100644 --- a/autoload/SpaceVim/api/notify.vim +++ b/autoload/SpaceVim/api/notify.vim @@ -108,8 +108,10 @@ function! s:self.close(...) abort call remove(self.message, 0) endif if len(self.message) == 0 - noautocmd call self.__floating.win_close(self.border.winid, v:true) - noautocmd call self.__floating.win_close(self.winid, v:true) + if self.win_is_open() + noautocmd call self.__floating.win_close(self.border.winid, v:true) + noautocmd call self.__floating.win_close(self.winid, v:true) + endif call remove(s:notifications, self.hashkey) let self.notification_width = 1 endif