Maintain cursor stack's position correctly when ascending the tree (#2795)

This fixes a bug that could cause the cursor to incorrectly report its
start when using `slice` or `seek_forward`, and then calling `prev`. We
didn't notice this because we were not testing those three methods
together.

I suppose this could explain some of the panics we've observed because
we do use `slice`/`seek_forward` followed by `prev` calls in production.
46dd717857Antonio Scandurra committed on 7/27/2023, 11:51:09 AM· committed by GitHubparents129e7112e0d051
2 files changedLine totals unavailable