Fix fold-related panic (#4008)

Although it's not super clear why this fails; in zed1 we used to have a
bounds
check. Restoring the bounds check for now, but leaving a debug_assert!
in case
a local reproduction happens.

Release Notes:

- Fix a panic that happened sometimes when rendering folds
b907f375a3Conrad Irwin committed on 1/10/2024, 11:53:25 PM· committed by GitHubparents3c1ed15766a869
1 file changedLine totals unavailable