Problem: When setting extmark for a codelens after it's asynchronously resolved, the line may have been removed, raising "invalid 'line': out of range" error. This is a regression from #34888. Solution: Re-introduce the line count check.
vim.pack
vim._async
on_client_exit