editor: Fix panics in `CursorPosition::update_position` (#41237)

Fixes a regression introduced in
https://github.com/zed-industries/zed/pull/39857. As for the exact
reason this causes this issue I am not yet sure will investigate (as per
the todos in code)

Fixes ZED-23R

Release Notes:

- N/A *or* Added/Fixed/Improved ...
ae3abf50d8Lukas Wirth committed on 10/27/2025, 8:26:39 AM· committed by GitHubparentedf2ec7
14 files changedLine totals unavailable