mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 21:13:02 +00:00
Cleanup
This commit is contained in:
parent
00b7c78e33
commit
7c3dc1e3dc
2 changed files with 0 additions and 37 deletions
|
@ -2635,7 +2635,6 @@ impl MultiBufferSnapshot {
|
|||
row_range: Range<u32>,
|
||||
reversed: bool,
|
||||
) -> impl 'a + Iterator<Item = DiffHunk<u32>> {
|
||||
// dbg!(&row_range);
|
||||
let mut lines_advance = 0;
|
||||
let mut cursor = self.excerpts.filter::<_, ExcerptSummary>(move |summary| {
|
||||
let filter = summary.text.lines.row + lines_advance >= row_range.start
|
||||
|
@ -2652,8 +2651,6 @@ impl MultiBufferSnapshot {
|
|||
|
||||
let range = excerpt.range.context.clone();
|
||||
let range_start_row = range.start.to_point(&excerpt.buffer).row;
|
||||
let range_end_row = range.end.to_point(&excerpt.buffer).row;
|
||||
// dbg!(range_start_row);
|
||||
let a = Some(excerpt.buffer.git_diff_hunks_in_range(range, reversed).map(
|
||||
move |mut hunk| {
|
||||
hunk.buffer_range.start = hunk.buffer_range.start.max(range_start_row)
|
||||
|
@ -2669,37 +2666,6 @@ impl MultiBufferSnapshot {
|
|||
a
|
||||
})
|
||||
.flatten()
|
||||
// let mut cursor = self.excerpts.cursor::<Point>();
|
||||
// cursor.seek(&Point::new(row_range.start, 0), Bias::Left, &());
|
||||
|
||||
// let mut is_first = true;
|
||||
// let mut advance = 0;
|
||||
// std::iter::from_fn(move || {
|
||||
// if !is_first {
|
||||
// cursor.next(&());
|
||||
// }
|
||||
// is_first = false;
|
||||
|
||||
// let (item, summary) = match (cursor.item(), cursor.item_summary()) {
|
||||
// (Some(item), Some(summary)) => (item, summary),
|
||||
// _ => return None,
|
||||
// };
|
||||
|
||||
// // dbg!(&advance);
|
||||
// // if advance > row_range.end {
|
||||
// // println!("returning none");
|
||||
// // return None;
|
||||
// // }
|
||||
|
||||
// // let row_range = row_range.start - advance..row_range.end - advance;
|
||||
// // println!("returning an iterator, {row_range:?}");
|
||||
// // // summary.
|
||||
// // advance += summary.text.lines.row;
|
||||
// Some(item.buffer.git_diff_hunks_in_range(row_range, reversed))
|
||||
|
||||
// item.range
|
||||
// })
|
||||
// .flatten()
|
||||
}
|
||||
|
||||
pub fn range_for_syntax_ancestor<T: ToOffset>(&self, range: Range<T>) -> Option<Range<usize>> {
|
||||
|
|
|
@ -77,9 +77,6 @@ impl BufferDiff {
|
|||
buffer: &'a BufferSnapshot,
|
||||
reversed: bool,
|
||||
) -> impl 'a + Iterator<Item = DiffHunk<u32>> {
|
||||
// let start = buffer.anchor_before(Point::new(query_row_range.start, 0));
|
||||
// let end = buffer.anchor_after(Point::new(query_row_range.end, 0));
|
||||
|
||||
let mut cursor = self.tree.filter::<_, DiffHunkSummary>(move |summary| {
|
||||
let before_start = summary.buffer_range.end.cmp(&range.start, buffer).is_lt();
|
||||
let after_end = summary.buffer_range.start.cmp(&range.end, buffer).is_gt();
|
||||
|
|
Loading…
Reference in a new issue