Merge pull request #1622 from rs017991/text_input_shift_click

TextInput: SHIFT+Left Click to Select
This commit is contained in:
Héctor Ramón 2023-01-02 19:52:21 +01:00 committed by GitHub
commit 54105a24e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -454,9 +454,17 @@ where
)
} else {
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;
}
click::Kind::Double => {