Handle Cmd/Shift + Click go-to action on mouse-up instead of mouse-down

This commit is contained in:
ForLoveOfCats 2022-08-08 15:59:33 -04:00
parent 96d5dcadf1
commit a47a6f2f22
2 changed files with 47 additions and 36 deletions

View file

@ -1787,6 +1787,14 @@ impl Editor {
cx.notify();
}
pub fn are_selections_empty(&self) -> bool {
let pending_empty = match self.selections.pending_anchor() {
Some(Selection { start, end, .. }) => start == end,
None => true,
};
pending_empty && self.columnar_selection_tail.is_none()
}
pub fn is_selecting(&self) -> bool {
self.selections.pending_anchor().is_some() || self.columnar_selection_tail.is_some()
}