F8 navigation bugs (#3163)
Release Notes: - Fixed "go to previous hunk" getting suck on deletion. - Fixed a rare case where "go to (prev) diagnostic" could get stuck with specifically overlapping diagnostics.
This commit is contained in:
commit
1936ba5e30
5 changed files with 180 additions and 10 deletions
|
@ -7213,6 +7213,7 @@ impl Editor {
|
|||
&& entry.diagnostic.severity <= DiagnosticSeverity::WARNING
|
||||
&& !entry.range.is_empty()
|
||||
&& Some(entry.range.end) != active_primary_range.as_ref().map(|r| *r.end())
|
||||
&& !entry.range.contains(&search_start)
|
||||
{
|
||||
Some((entry.range, entry.diagnostic.group_id))
|
||||
} else {
|
||||
|
@ -7319,11 +7320,11 @@ impl Editor {
|
|||
let display_point = initial_point.to_display_point(snapshot);
|
||||
let mut hunks = hunks
|
||||
.map(|hunk| diff_hunk_to_display(hunk, &snapshot))
|
||||
.skip_while(|hunk| {
|
||||
.filter(|hunk| {
|
||||
if is_wrapped {
|
||||
false
|
||||
true
|
||||
} else {
|
||||
hunk.contains_display_row(display_point.row())
|
||||
!hunk.contains_display_row(display_point.row())
|
||||
}
|
||||
})
|
||||
.dedup();
|
||||
|
@ -8957,6 +8958,16 @@ impl Editor {
|
|||
telemetry.report_clickhouse_event(event, telemetry_settings);
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
fn report_editor_event(
|
||||
&self,
|
||||
_operation: &'static str,
|
||||
_file_extension: Option<String>,
|
||||
_cx: &AppContext,
|
||||
) {
|
||||
}
|
||||
|
||||
#[cfg(not(any(test, feature = "test-support")))]
|
||||
fn report_editor_event(
|
||||
&self,
|
||||
operation: &'static str,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue