Implement word-wise mouse selection

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-11-23 18:50:17 +01:00
co-authored by Nathan Sobo
parent 3269b9925f
commit bcf38e6bb5
6 changed files with 77 additions and 51 deletions
+1
View File
@@ -3651,6 +3651,7 @@ mod tests {
Event::LeftMouseDown {
position: Default::default(),
cmd: false,
click_count: 1,
},
cx,
);
+1 -1
View File
@@ -15,7 +15,7 @@ pub enum Event {
LeftMouseDown {
position: Vector2F,
cmd: bool,
count: usize,
click_count: usize,
},
LeftMouseUp {
position: Vector2F,
+1 -1
View File
@@ -94,7 +94,7 @@ impl Event {
cmd: native_event
.modifierFlags()
.contains(NSEventModifierFlags::NSCommandKeyMask),
count: native_event.clickCount() as usize,
click_count: native_event.clickCount() as usize,
})
}
NSEventType::NSLeftMouseUp => window_height.map(|window_height| Self::LeftMouseUp {