# Fix possibility of infinite loop in selections_with_autoclose_regions · gitcafe/zed

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

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

Visibility: public

Requested revision: 655c9ece2decdb550192959175c9cd3cd88f26d1

Requested commit: 655c9ece2decdb550192959175c9cd3cd88f26d1

Commit: 655c9ece2decdb550192959175c9cd3cd88f26d1

Tree: 992604aaec3c4bbdecdc900d7ff622e7ce633ed0

Author: Max Brunsfeld

Committer: Max Brunsfeld

## Message

```
Fix possibility of infinite loop in selections_with_autoclose_regions

Previously, that method could loop forever if the editor's autoclose
regions had unexpected selection ids.

Co-authored-by: Piotr <piotr@zed.dev>

```

## Parents

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

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