Add support for ctrl+h as backspace (#1812)

This commit is contained in:
Sahil Singh 2022-07-21 22:53:24 +05:30 committed by GitHub
parent bf15bb6e19
commit 48d48096eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1090,6 +1090,11 @@ fn on_key_press(
None None
} }
Key::H if modifiers.ctrl => {
let ccursor = delete_previous_char(text, cursor_range.primary.ccursor);
Some(CCursorRange::one(ccursor))
}
Key::K if modifiers.ctrl => { Key::K if modifiers.ctrl => {
let ccursor = delete_paragraph_after_cursor(text, galley, cursor_range); let ccursor = delete_paragraph_after_cursor(text, galley, cursor_range);
Some(CCursorRange::one(ccursor)) Some(CCursorRange::one(ccursor))