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:
co-authored by
Nathan Sobo
Conrad Irwin
parent
f859b328f0
commit
76871056f5
@@ -513,7 +513,7 @@ impl ProjectDiagnosticsEditor {
|
||||
buffer.clone(),
|
||||
[ExcerptRange {
|
||||
context: context_range.clone(),
|
||||
primary: Some(range.clone()),
|
||||
primary: range.clone(),
|
||||
}],
|
||||
cx,
|
||||
)
|
||||
|
||||
@@ -913,7 +913,7 @@ fn get_diagnostics_excerpts(
|
||||
path: buffer.file().unwrap().path().to_path_buf(),
|
||||
range: ExcerptRange {
|
||||
context: range.context.to_point(buffer),
|
||||
primary: range.primary.map(|range| range.to_point(buffer)),
|
||||
primary: range.primary.to_point(buffer),
|
||||
},
|
||||
group_id: usize::MAX,
|
||||
primary: false,
|
||||
|
||||
Reference in New Issue
Block a user