Skip to content

Commit

Permalink
Add a workaround for Neovim #23036.
Browse files Browse the repository at this point in the history
  • Loading branch information
dstein64 committed Apr 12, 2023
1 parent 6580cf5 commit daacd02
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions autoload/startuptime.vim
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,16 @@ function! s:Profile(onfinish, onprogress, options, tries, file, items) abort
call delete(a:file)
endif
if a:tries ==# 0
if has('nvim-0.9') && a:options.tries * 2 ==# len(a:items)
" Add a workaround for Neovim #23036. When the number of results is double
" what's expected, use every other result.
let l:items = []
for l:idx in range(0, len(a:items) - 1, 2)
call add(l:items, a:items[l:idx])
endfor
call remove(a:items, 0, -1)
call extend(a:items, l:items)
endif
call a:onfinish()
return
endif
Expand Down

0 comments on commit daacd02

Please sign in to comment.