editor: Remove buffer and display map fields from SelectionsCollection (#42175)
Release Notes: - N/A *or* Added/Fixed/Improved ...
This commit is contained in:
@@ -63,6 +63,14 @@ pub struct BlockSnapshot {
|
||||
pub(super) excerpt_header_height: u32,
|
||||
}
|
||||
|
||||
impl Deref for BlockSnapshot {
|
||||
type Target = WrapSnapshot;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.wrap_snapshot
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct CustomBlockId(pub usize);
|
||||
|
||||
|
||||
@@ -630,6 +630,14 @@ pub struct FoldSnapshot {
|
||||
pub version: usize,
|
||||
}
|
||||
|
||||
impl Deref for FoldSnapshot {
|
||||
type Target = InlaySnapshot;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.inlay_snapshot
|
||||
}
|
||||
}
|
||||
|
||||
impl FoldSnapshot {
|
||||
pub fn buffer(&self) -> &MultiBufferSnapshot {
|
||||
&self.inlay_snapshot.buffer
|
||||
|
||||
@@ -32,6 +32,14 @@ pub struct InlaySnapshot {
|
||||
pub version: usize,
|
||||
}
|
||||
|
||||
impl std::ops::Deref for InlaySnapshot {
|
||||
type Target = MultiBufferSnapshot;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.buffer
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
enum Transform {
|
||||
Isomorphic(TextSummary),
|
||||
|
||||
@@ -167,6 +167,14 @@ pub struct TabSnapshot {
|
||||
pub version: usize,
|
||||
}
|
||||
|
||||
impl std::ops::Deref for TabSnapshot {
|
||||
type Target = FoldSnapshot;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.fold_snapshot
|
||||
}
|
||||
}
|
||||
|
||||
impl TabSnapshot {
|
||||
pub fn buffer_snapshot(&self) -> &MultiBufferSnapshot {
|
||||
&self.fold_snapshot.inlay_snapshot.buffer
|
||||
|
||||
@@ -43,6 +43,14 @@ pub struct WrapSnapshot {
|
||||
interpolated: bool,
|
||||
}
|
||||
|
||||
impl std::ops::Deref for WrapSnapshot {
|
||||
type Target = TabSnapshot;
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.tab_snapshot
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Eq, PartialEq)]
|
||||
struct Transform {
|
||||
summary: TransformSummary,
|
||||
|
||||
Reference in New Issue
Block a user