Preserve cursor position when resetting excerpts (#27850)
Release Notes: - N/A --------- Co-authored-by: Nathan Sobo <nathan@zed.dev> Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
This commit is contained in:
parent
f859b328f0
commit
76871056f5
19 changed files with 299 additions and 617 deletions
|
@ -2125,26 +2125,17 @@ mod tests {
|
|||
let mut multi_buffer = MultiBuffer::new(Capability::ReadWrite);
|
||||
excerpt_ids.extend(multi_buffer.push_excerpts(
|
||||
buffer1.clone(),
|
||||
[ExcerptRange {
|
||||
context: 0..buffer1.read(cx).len(),
|
||||
primary: None,
|
||||
}],
|
||||
[ExcerptRange::new(0..buffer1.read(cx).len())],
|
||||
cx,
|
||||
));
|
||||
excerpt_ids.extend(multi_buffer.push_excerpts(
|
||||
buffer2.clone(),
|
||||
[ExcerptRange {
|
||||
context: 0..buffer2.read(cx).len(),
|
||||
primary: None,
|
||||
}],
|
||||
[ExcerptRange::new(0..buffer2.read(cx).len())],
|
||||
cx,
|
||||
));
|
||||
excerpt_ids.extend(multi_buffer.push_excerpts(
|
||||
buffer3.clone(),
|
||||
[ExcerptRange {
|
||||
context: 0..buffer3.read(cx).len(),
|
||||
primary: None,
|
||||
}],
|
||||
[ExcerptRange::new(0..buffer3.read(cx).len())],
|
||||
cx,
|
||||
));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue