Skip to content
Snippets Groups Projects
Commit 5344c2f2 authored by gwenn's avatar gwenn
Browse files

Invert C-K/C-U when numeric args are negative

parent efbd8251
No related branches found
No related tags found
No related merge requests found
......@@ -193,7 +193,13 @@ impl EditState {
}
}
KeyPress::Tab => Cmd::Complete,
KeyPress::Ctrl('K') => Cmd::Kill(Movement::EndOfLine),
KeyPress::Ctrl('K') => {
if positive {
Cmd::Kill(Movement::EndOfLine)
} else {
Cmd::Kill(Movement::BeginningOfLine)
}
}
KeyPress::Ctrl('L') => Cmd::ClearScreen,
KeyPress::Ctrl('N') => Cmd::NextHistory,
KeyPress::Ctrl('P') => Cmd::PreviousHistory,
......@@ -511,7 +517,13 @@ impl EditState {
KeyPress::Ctrl('R') => Cmd::ReverseSearchHistory,
KeyPress::Ctrl('S') => Cmd::ForwardSearchHistory, // most terminals override Ctrl+S to suspend execution
KeyPress::Ctrl('T') => Cmd::TransposeChars,
KeyPress::Ctrl('U') => Cmd::Kill(Movement::BeginningOfLine),
KeyPress::Ctrl('U') => {
if positive {
Cmd::Kill(Movement::BeginningOfLine)
} else {
Cmd::Kill(Movement::EndOfLine)
}
},
KeyPress::Ctrl('Q') | // most terminals override Ctrl+Q to resume execution
KeyPress::Ctrl('V') => Cmd::QuotedInsert,
KeyPress::Ctrl('W') => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment