Search in selections (#10831)
Release Notes: - Adding [#8617 ](https://github.com/zed-industries/zed/issues/8617) --------- Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
428c143fbb
commit
c7c19609b3
13 changed files with 818 additions and 69 deletions
|
@ -273,6 +273,13 @@ impl SelectionsCollection {
|
|||
self.all(cx).last().unwrap().clone()
|
||||
}
|
||||
|
||||
pub fn disjoint_anchor_ranges(&self) -> Vec<Range<Anchor>> {
|
||||
self.disjoint_anchors()
|
||||
.iter()
|
||||
.map(|s| s.start..s.end)
|
||||
.collect()
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn ranges<D: TextDimension + Ord + Sub<D, Output = D> + std::fmt::Debug>(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue