editor: Fix panic when syncing empty selections (#39047)

Fixes ZED-1KF

Release Notes:

- Fixed commit modal panicking in specific scenario
cc85a48de5Lukas Wirth committed on 9/28/2025, 11:01:16 AM· committed by GitHubparent4cd839e
1 file changedLine totals unavailable