mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-05 02:20:10 +00:00
Do not allow cmd+click in invalid inlay context
This commit is contained in:
parent
693e91f335
commit
81e70905bb
2 changed files with 6 additions and 4 deletions
|
@ -2755,7 +2755,7 @@ impl PointForPosition {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn as_valid(&self) -> Option<DisplayPoint> {
|
pub fn as_valid(&self) -> Option<DisplayPoint> {
|
||||||
if self.previous_valid == self.exact_unclipped && self.next_valid == self.exact_unclipped {
|
if self.previous_valid == self.exact_unclipped && self.next_valid == self.exact_unclipped {
|
||||||
Some(self.previous_valid)
|
Some(self.previous_valid)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -596,9 +596,11 @@ fn go_to_fetched_definition_of_kind(
|
||||||
cx,
|
cx,
|
||||||
);
|
);
|
||||||
|
|
||||||
match kind {
|
if point.as_valid().is_some() {
|
||||||
LinkDefinitionKind::Symbol => editor.go_to_definition(&Default::default(), cx),
|
match kind {
|
||||||
LinkDefinitionKind::Type => editor.go_to_type_definition(&Default::default(), cx),
|
LinkDefinitionKind::Symbol => editor.go_to_definition(&Default::default(), cx),
|
||||||
|
LinkDefinitionKind::Type => editor.go_to_type_definition(&Default::default(), cx),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue