Problem: The sleep before collecting the initial screen state is confusing and may lead to unexpected success if it comes after a blocking RPC call. Solution: Remove that sleep and add an "intermediate" argument.
:lua vim.
vim.inspect_pos
vim.show_pos
:Inspect