Skip to content

Commit 797f9d0

Browse files
author
Will Pragnell
committed
sy#util#popup_close: Check for valid window before closing
Fixes #408
1 parent 7d538b7 commit 797f9d0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoload/sy/util.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ endfunction
134134
" #popup_close {{{1
135135
function! sy#util#popup_close() abort
136136
if s:popup_window
137-
call nvim_win_close(s:popup_window, 1)
137+
if nvim_win_is_valid(s:popup_window)
138+
call nvim_win_close(s:popup_window, 1)
139+
endif
138140
let s:popup_window = 0
139141
endif
140142
endfunction

0 commit comments

Comments
 (0)