Return a Fold struct when querying the FoldMap
This contains a new `id` field that lets us distinguish among folds. Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
co-authored by
Nathan Sobo
parent
851a60a68e
commit
3ff8c78b58
@@ -5303,8 +5303,8 @@ impl Editor {
|
||||
buffer.anchor_before(range_to_move.start)
|
||||
..buffer.anchor_after(range_to_move.end),
|
||||
) {
|
||||
let mut start = fold.start.to_point(&buffer);
|
||||
let mut end = fold.end.to_point(&buffer);
|
||||
let mut start = fold.range.start.to_point(&buffer);
|
||||
let mut end = fold.range.end.to_point(&buffer);
|
||||
start.row -= row_delta;
|
||||
end.row -= row_delta;
|
||||
refold_ranges.push(start..end);
|
||||
@@ -5394,8 +5394,8 @@ impl Editor {
|
||||
buffer.anchor_before(range_to_move.start)
|
||||
..buffer.anchor_after(range_to_move.end),
|
||||
) {
|
||||
let mut start = fold.start.to_point(&buffer);
|
||||
let mut end = fold.end.to_point(&buffer);
|
||||
let mut start = fold.range.start.to_point(&buffer);
|
||||
let mut end = fold.range.end.to_point(&buffer);
|
||||
start.row += row_delta;
|
||||
end.row += row_delta;
|
||||
refold_ranges.push(start..end);
|
||||
|
||||
Reference in New Issue
Block a user