# editor: Fix panic in wrap_map \(\#43650\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8e04706c4d2b5ef454e1c1ffb9d5aac72118b55d

Requested commit: 8e04706c4d2b5ef454e1c1ffb9d5aac72118b55d

Commit: 8e04706c4d2b5ef454e1c1ffb9d5aac72118b55d

Tree: a843971fe108c995f88f8e12a4cfef1d27471189

Author: Lukas Wirth

Committer: GitHub

## Message

```
editor: Fix panic in wrap_map (#43650)

Fixes ZED-3P9

We only clamped the end which for a completely wrong input could cause
us to construct a reversed range which will end up underflowing later
on.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
```

## Parents

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

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