[vim] Throw error when popup support is unavailable

https://github.com/junegunn/fzf.vim/issues/943
https://github.com/junegunn/fzf.vim/issues/959
This commit is contained in:
Junegunn Choi 2020-03-01 20:57:35 +09:00
parent 4c9cab3f8a
commit 6db15e8693
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -662,6 +662,9 @@ function! s:split(dict)
try try
if s:present(a:dict, 'window') if s:present(a:dict, 'window')
if type(a:dict.window) == type({}) if type(a:dict.window) == type({})
if !has('nvim') && !has('patch-8.2.191')
throw 'Vim 8.2.191 or later is required for pop-up window'
end
call s:popup(a:dict.window) call s:popup(a:dict.window)
else else
execute 'keepalt' a:dict.window execute 'keepalt' a:dict.window