TextInput: SHIFT+Left Click to Select
This commit is contained in:
parent
a6d0d5773f
commit
280ffd26b7
1 changed files with 10 additions and 2 deletions
|
|
@ -454,9 +454,17 @@ where
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
};
|
}
|
||||||
|
.unwrap_or(0);
|
||||||
|
|
||||||
state.cursor.move_to(position.unwrap_or(0));
|
if state.keyboard_modifiers.shift() {
|
||||||
|
state.cursor.select_range(
|
||||||
|
state.cursor.start(value),
|
||||||
|
position,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
state.cursor.move_to(position);
|
||||||
|
}
|
||||||
state.is_dragging = true;
|
state.is_dragging = true;
|
||||||
}
|
}
|
||||||
click::Kind::Double => {
|
click::Kind::Double => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue