Compare commits

...

3 Commits

Author SHA1 Message Date
Zed Bot
8b8e4deb86 Bump to 0.207.1 for @Veykril 2025-10-04 11:49:00 +00:00
Lukas Wirth
fc63cce6b9 Fix ExcerptId::max() hnadling in summaries_for_anchors
Co-authored-by: Smit Barmase <smit@zed.dev>
2025-10-03 11:39:30 +02:00
Joseph T. Lyons
471f338b4f v0.207.x preview 2025-10-01 11:27:39 -04:00
4 changed files with 11 additions and 15 deletions

2
Cargo.lock generated
View File

@@ -20196,7 +20196,7 @@ dependencies = [
[[package]]
name = "zed"
version = "0.207.0"
version = "0.207.1"
dependencies = [
"acp_tools",
"activity_indicator",

View File

@@ -4959,24 +4959,20 @@ impl MultiBufferSnapshot {
let mut summaries = Vec::new();
while let Some(anchor) = anchors.peek() {
let excerpt_id = self.latest_excerpt_id(anchor.excerpt_id);
let excerpt_anchors = iter::from_fn(|| {
let anchor = anchors.peek()?;
if self.latest_excerpt_id(anchor.excerpt_id) == excerpt_id {
Some(anchors.next().unwrap())
} else {
None
}
let excerpt_anchors = anchors.peeking_take_while(|anchor| {
self.latest_excerpt_id(anchor.excerpt_id) == excerpt_id
});
let locator = self.excerpt_locator_for_id(excerpt_id);
cursor.seek_forward(locator, Bias::Left);
if cursor.item().is_none() {
cursor.next();
if cursor.item().is_none() && excerpt_id == ExcerptId::max() {
cursor.prev();
}
let excerpt_start_position = D::from_text_summary(&cursor.start().text);
if let Some(excerpt) = cursor.item() {
if excerpt.id != excerpt_id {
if excerpt.id != excerpt_id && excerpt_id != ExcerptId::max() {
let position = self.resolve_summary_for_anchor(
&Anchor::min(),
excerpt_start_position,
@@ -6203,7 +6199,7 @@ impl MultiBufferSnapshot {
.cursor::<Dimensions<Option<&Locator>, ExcerptDimension<Point>>>(());
let locator = self.excerpt_locator_for_id(excerpt_id);
let mut sought_exact = cursor.seek(&Some(locator), Bias::Left);
if excerpt_id == ExcerptId::max() {
if cursor.item().is_none() && excerpt_id == ExcerptId::max() {
sought_exact = true;
cursor.prev();
} else if excerpt_id == ExcerptId::min() {
@@ -6235,7 +6231,7 @@ impl MultiBufferSnapshot {
&& excerpt.id == excerpt_id
{
return Some(excerpt);
} else if excerpt_id == ExcerptId::max() {
} else if cursor.item().is_none() && excerpt_id == ExcerptId::max() {
cursor.prev();
return cursor.item();
}

View File

@@ -2,7 +2,7 @@
description = "The fast, collaborative code editor."
edition.workspace = true
name = "zed"
version = "0.207.0"
version = "0.207.1"
publish.workspace = true
license = "GPL-3.0-or-later"
authors = ["Zed Team <hi@zed.dev>"]

View File

@@ -1 +1 @@
dev
preview