Merge pull request #268 from FabianLars/ctrl-del
implement ctrl + del on text-input
This commit is contained in:
commit
703beae05e
@ -358,6 +358,21 @@ where
|
|||||||
messages.push(message);
|
messages.push(message);
|
||||||
}
|
}
|
||||||
keyboard::KeyCode::Delete => {
|
keyboard::KeyCode::Delete => {
|
||||||
|
if platform::is_jump_modifier_pressed(modifiers)
|
||||||
|
&& self.state.cursor.selection().is_none()
|
||||||
|
{
|
||||||
|
if self.is_secure {
|
||||||
|
let cursor_pos = self.state.cursor.end(&self.value);
|
||||||
|
self.state
|
||||||
|
.cursor
|
||||||
|
.select_range(cursor_pos, self.value.len());
|
||||||
|
} else {
|
||||||
|
self.state
|
||||||
|
.cursor
|
||||||
|
.select_right_by_words(&self.value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let mut editor =
|
let mut editor =
|
||||||
Editor::new(&mut self.value, &mut self.state.cursor);
|
Editor::new(&mut self.value, &mut self.state.cursor);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user