Only preserve excerpts for invalid diagnostics if they contain cursors
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
dcf26acaac
commit
304afc1813
@@ -3116,6 +3116,10 @@ impl Editor {
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn local_anchor_selections(&self) -> &Arc<[Selection<Anchor>]> {
|
||||
&self.selections
|
||||
}
|
||||
|
||||
fn resolve_selections<'a, D, I>(
|
||||
&self,
|
||||
selections: I,
|
||||
|
||||
@@ -28,6 +28,10 @@ impl Anchor {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn excerpt_id(&self) -> &ExcerptId {
|
||||
&self.excerpt_id
|
||||
}
|
||||
|
||||
pub fn cmp<'a>(&self, other: &Anchor, snapshot: &MultiBufferSnapshot) -> Result<Ordering> {
|
||||
let excerpt_id_cmp = self.excerpt_id.cmp(&other.excerpt_id);
|
||||
if excerpt_id_cmp.is_eq() {
|
||||
|
||||
Reference in New Issue
Block a user