# editor: Optimize selection overlap checking \(\#41281\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 73bd12ebbedd092f2797939349d270518de94e19

Requested commit: 73bd12ebbedd092f2797939349d270518de94e19

Commit: 73bd12ebbedd092f2797939349d270518de94e19

Tree: 048c22637df0b09d29902f831919fccf85fa14a2

Author: Xiaobo Liu

Committer: GitHub

## Message

```
editor: Optimize selection overlap checking (#41281)

Replace the binary search approach with a more efficient partition_point
method for checking selection overlaps. This eliminates the need to
collect and sort selection ranges separately, reducing memory allocation
and improving performance when handling multiple selections.

Release Notes:

- N/A

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
```

## Parents

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

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