Skip to content

Commit

Permalink
fix(util): timer to open in vim
Browse files Browse the repository at this point in the history
Closes #5011
  • Loading branch information
fannheyward committed May 21, 2024
1 parent d33fbed commit 26386c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoload/coc/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ function! coc#util#jump(cmd, filepath, ...) abort
elseif a:cmd ==# 'edit' && bufloaded(file)
exe 'b '.bufnr(file)
else
call s:safer_open(a:cmd, file)
if s:is_vim
call timer_start(10, { -> s:safer_open(a:cmd, file)})
else
call s:safer_open(a:cmd, file)
endif
endif
if !empty(get(a:, 1, []))
let line = getline(a:1[0] + 1)
Expand Down

0 comments on commit 26386c4

Please sign in to comment.