# Don't push to selection history if selections are empty \(\#32433\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/08210b512ddc8b43808b7a16fdd4310dbf48a77b)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 08210b512ddc8b43808b7a16fdd4310dbf48a77b

Requested commit: 08210b512ddc8b43808b7a16fdd4310dbf48a77b

Commit: 08210b512ddc8b43808b7a16fdd4310dbf48a77b

Tree: 994e1dab8756d38a8525bd6944009b1494007039

Author: Michael Sloan

Committer: GitHub

## Message

```
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
```

## Parents

- [6070aea6c094a4fb6056785002923d119e5ce2a0](https://git.cafe/gitcafe/zed/commit/6070aea6c094a4fb6056785002923d119e5ce2a0?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/08210b512ddc8b43808b7a16fdd4310dbf48a77b?format=markdown)
