From a0db70b063bbec6ea23507162b025fd874077d85 Mon Sep 17 00:00:00 2001 From: Wang Shidong Date: Fri, 31 Jul 2020 20:39:21 +0800 Subject: [PATCH] Fix unknown function popup_list (#3673) --- autoload/SpaceVim/api/vim/statusline.vim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/autoload/SpaceVim/api/vim/statusline.vim b/autoload/SpaceVim/api/vim/statusline.vim index 0e08d0a75..ce091fff9 100644 --- a/autoload/SpaceVim/api/vim/statusline.vim +++ b/autoload/SpaceVim/api/vim/statusline.vim @@ -106,10 +106,14 @@ if has('nvim') endfunction else function! s:self.opened() abort - "tabpage" will be -1 for a global popup, zero for a popup on - "the current tabpage and a positive number for a popup on - "another tabpage. - return index(popup_list(), self.__winid) != -1 + "tabpage" will be -1 for a global popup, zero for a popup on + "the current tabpage and a positive number for a popup on + "another tabpage. + if exists('*popup_list') + return index(popup_list(), self.__winid) != -1 + else + return index([-1, 0], get(popup_getoptions(self.__winid), 'tabpage', -2)) != -1 + endif endfunction endif