Skip to content

Commit 8351fd3

Browse files
authored
Close float window on InsertEnter or BufLeave (prabirshrestha#1459)
* Close float window on InsertEnter or BufLeave * Ignore vint in dynamically executed augroups
1 parent 6017a30 commit 8351fd3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

autoload/lsp/internal/document_hover/under_cursor.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,11 @@ function! s:show_floating_window(server_name, request, response) abort
160160
endif
161161

162162
execute printf('augroup vim_lsp_hover_close_on_move_%d', bufnr('%'))
163+
" vint: -ProhibitAutocmdWithNoGroup
163164
autocmd!
164-
execute printf('autocmd InsertEnter,BufLeave,CursorMoved <buffer> call s:close_floating_window_on_move(%s)', getcurpos())
165+
autocmd InsertEnter,BufLeave <buffer> call s:close_floating_window()
166+
execute printf('autocmd CursorMoved <buffer> call s:close_floating_window_on_move(%s)', getcurpos())
167+
" vint: +ProhibitAutocmdWithNoGroup
165168
augroup END
166169

167170
" Show popupmenu and apply markdown syntax.

0 commit comments

Comments
 (0)