1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-23 13:00:04 +08:00

fix(notify): check win_is_open before close notify

This commit is contained in:
wsdjeg 2022-04-04 19:17:31 +08:00
parent 26fb76fe26
commit d387021598

View File

@ -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