helix/helix-core
Skyler Hawthorne 4b3aad7830 Add Selection::{overlaps,without} and fix contains
Adds two helper functions to `Selection`:

* `overlaps`: tests whether two `Selection`s contain any ranges which
  overlap with each other
* `without`: Computes a new `Selection` that is the set difference
  of two `Selection`s, i.e. everything in the first `Selection`
  with everything that overlaps in the second `Selection` removed,
  potentially leaving holes in the original ranges.

It also fixes a bug with `Selection::contains`: it assumes that if the
second `Selection` has a greater number of ranges than the first, then
the first cannot contain the second; but this is false, since one range
from the first could contain multiple smaller ranges in the second.
2025-05-26 19:22:20 -04:00
..
src Add Selection::{overlaps,without} and fix contains 2025-05-26 19:22:20 -04:00
tests Replace tree-sitter with tree-house 2025-05-13 18:43:43 -04:00
.gitignore Initial import. 2020-05-20 18:14:51 +09:00
Cargo.toml Replace tree-sitter with tree-house 2025-05-13 18:43:43 -04:00