mirror of
https://github.com/wez/wezterm.git
synced 2024-12-24 05:42:03 +03:00
lineedit: add ctrl-w to delete word up to cursor
This commit is contained in:
parent
56885e5bad
commit
0d2bbcfce6
@ -29,6 +29,7 @@
|
||||
//! Ctrl-J, Ctrl-M, Enter | Finish line editing and accept the current line
|
||||
//! Ctrl-K | Delete from cursor to end of line
|
||||
//! Ctrl-L | Move the cursor to the top left, clear screen and repaint
|
||||
//! Ctrl-W | Delete word leading up to cursor
|
||||
//! Alt-b, Alt-Left | Move the cursor backwards one word
|
||||
//! Alt-f, Alt-Right | Move the cursor forwards one word
|
||||
use crate::caps::{Capabilities, ProbeHintsBuilder};
|
||||
@ -160,6 +161,12 @@ impl<T: Terminal> LineEditor<T> {
|
||||
modifiers: Modifiers::NONE,
|
||||
}) => Some(Action::Move(Movement::BackwardChar(1))),
|
||||
|
||||
InputEvent::Key(KeyEvent {
|
||||
key: KeyCode::Char('W'),
|
||||
modifiers: Modifiers::CTRL,
|
||||
})
|
||||
=> Some(Action::Kill(Movement::BackwardWord(1))),
|
||||
|
||||
InputEvent::Key(KeyEvent {
|
||||
key: KeyCode::Char('b'),
|
||||
modifiers: Modifiers::ALT,
|
||||
|
Loading…
Reference in New Issue
Block a user