Fix crash on invalid nvim float buffer

re #282
This commit is contained in:
Andy K. Massimino
2023-04-12 20:59:58 -04:00
parent 03ebc3b7db
commit f5d1e1b2b3

View File

@@ -789,7 +789,8 @@ function! s:do_offscreen_popup_nvim(offscreen) abort " {{{1
endif
if l:text_method
if !exists('s:float_bufnr')
if !exists('s:float_bufnr') || bufnr(s:float_bufnr) < 0
call s:close_floating_win()
let s:float_bufnr = nvim_create_buf(0, 1)
endif
let l:bufnr = s:float_bufnr