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

fix(notify): fix win_is_open function

This commit is contained in:
wsdjeg 2022-04-04 19:46:41 +08:00
parent d387021598
commit 007cbd6684

View File

@ -61,9 +61,15 @@ endfunction
function! s:self.win_is_open() abort
try
return self.winid >= 0 && self.border.winid >= 0
\ && has_key(nvim_win_get_config(self.winid), 'col')
\ && has_key(nvim_win_get_config(self.border.winid), 'col')
if exists('*nvim_win_get_config')
return self.winid >= 0 && self.border.winid >= 0
\ && has_key(nvim_win_get_config(self.winid), 'col')
\ && has_key(nvim_win_get_config(self.border.winid), 'col')
elseif exists('*popup_getoptions')
return self.winid >= 0 && self.border.winid >= 0
\ && has_key(popup_getoptions(self.winid), 'col')
\ && has_key(popup_getoptions(self.border.winid), 'col')
endif
catch
return 0
endtry