Skip to content

Commit 8670143

Browse files
authored
Merge pull request #409 from goonzoid/master
sy#util#popup_close: Check for valid window before closing
2 parents ee2c82c + 797f9d0 commit 8670143

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)