editor: Optimize selection overlap checking with binary search (#39773)

Replace O(n²) linear search with O(log n) binary search for checking
selection overlaps when finding next selection range. Pre-sort selection
ranges and use binary search to significantly improve performance when
working with many selections.

Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
47a66c938fXiaobo Liu committed on 10/13/2025, 8:54:53 AM· committed by GitHubparent1ca2f98
1 file changedLine totals unavailable