Don't push to selection history if selections are empty (#32433)

I got a panic during undo but haven't been able to repro it. Potentially
a consequence of my changes in #31731

> Thread "main" panicked with "There must be at least one selection" at
crates/editor/src/selections_collection.rs

Leaving release notes blank as I'm not sure this actually fixes the
panic

Release Notes:

- N/A
08210b512dMichael Sloan committed on 6/10/2025, 4:29:45 AM· committed by GitHubparent6070aea
1 file changedLine totals unavailable