Skip to content

Commit

Permalink
Move FirenvimUIEnterAugroup creation to firenvim#run for #1660
Browse files Browse the repository at this point in the history
This prevents issues with Vim.
  • Loading branch information
glacambre committed Jan 8, 2025
1 parent 0969738 commit c401a83
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions autoload/firenvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ function! firenvim#run() abort
endtry
call WriteStdout(a:id, l:response)
endfunction
" #1660: only create the Firenvim augroup when firenvim#run has been
" called in order to prevent issues with Vim.
augroup FirenvimUIEnterAugroup
autocmd!
autocmd UIEnter * call firenvim#onUIEnter(deepcopy(v:event))
augroup END
" g:firenvim_c might not exist for firenvim installations dating back
" to 2021 and earlier.
if exists('g:firenvim_c')
Expand Down
5 changes: 0 additions & 5 deletions plugin/firenvim.vim
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@ if exists('g:firenvim_loaded')
finish
endif
let g:firenvim_loaded = 1

augroup FirenvimUIEnterAugroup
autocmd!
autocmd UIEnter * call firenvim#onUIEnter(deepcopy(v:event))
augroup END

0 comments on commit c401a83

Please sign in to comment.