Skip to content

Commit

Permalink
Set Ctrl-J/\n to ReedlineCommand::Enter (#855)
Browse files Browse the repository at this point in the history
Permits terminal automation sending a `\n` to behave the same as if a
`\r` is sent which is the canonical Enter according to ANSI/crossterm
  • Loading branch information
sholderbach authored Nov 21, 2024
1 parent 7975013 commit 3c46dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/edit_mode/keybindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ pub fn add_common_edit_bindings(kb: &mut Keybindings) {
);
kb.add_binding(KM::ALT, KC::Enter, edit_bind(EC::InsertNewline));
kb.add_binding(KM::SHIFT, KC::Enter, edit_bind(EC::InsertNewline));
kb.add_binding(KM::CONTROL, KC::Char('j'), edit_bind(EC::InsertNewline));
kb.add_binding(KM::CONTROL, KC::Char('j'), ReedlineEvent::Enter);
}

pub fn add_common_selection_bindings(kb: &mut Keybindings) {
Expand Down

0 comments on commit 3c46dc2

Please sign in to comment.