Skip to content

Commit

Permalink
Check that popup window exists before closing. #2
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Jan 5, 2024
1 parent 9a222e0 commit b50013e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoload/win.vim
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ function! s:OpenPopup(text, highlight, row, col)
endfunction

function! s:ClosePopup(winid)
" The popup may no longer exist. #2
if empty(getwininfo(a:winid))
return
endif
if s:popupwin
call popup_close(a:winid)
elseif s:floatwin
Expand Down

0 comments on commit b50013e

Please sign in to comment.