working diagnostic popover. Also renamed GoToNextDiagnostic to GoToDiagnostic and adjusted it's action to jump to the popover's diagnostic if it is visible

This commit is contained in:
K Simmons 2022-07-15 19:39:52 -07:00
parent dbedc30abe
commit 95952f0c66
11 changed files with 355 additions and 165 deletions

View file

@ -54,6 +54,13 @@ impl<T: Clone> Selection<T> {
goal: self.goal,
}
}
pub fn collapse_to(&mut self, point: T, new_goal: SelectionGoal) {
self.start = point.clone();
self.end = point;
self.goal = new_goal;
self.reversed = false;
}
}
impl<T: Copy + Ord> Selection<T> {
@ -78,13 +85,6 @@ impl<T: Copy + Ord> Selection<T> {
self.goal = new_goal;
}
pub fn collapse_to(&mut self, point: T, new_goal: SelectionGoal) {
self.start = point;
self.end = point;
self.goal = new_goal;
self.reversed = false;
}
pub fn range(&self) -> Range<T> {
self.start..self.end
}