Skip to content

Commit

Permalink
fix(util): timer to open file in vim (#5016)
Browse files Browse the repository at this point in the history
Closes #5011
  • Loading branch information
fannheyward authored May 21, 2024
1 parent d33fbed commit 5c3bdc0
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 5c3bdc0

Please sign in to comment.