From 807279208d2fd3c08da0a10bca47c3f1d5df0b9d Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Fri, 21 Jul 2023 09:08:40 -0600 Subject: [PATCH] Fix shift-enter in search If you want to type a newline in an auto_height editor, ctrl and ctrl-shift are your friends. --- assets/keymaps/default.json | 4 ++-- crates/vim/src/normal/search.rs | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/keymaps/default.json b/assets/keymaps/default.json index 883b0c1872..7ebf5004dd 100644 --- a/assets/keymaps/default.json +++ b/assets/keymaps/default.json @@ -195,8 +195,8 @@ { "context": "Editor && mode == auto_height", "bindings": { - "shift-enter": "editor::Newline", - "cmd-shift-enter": "editor::NewlineBelow" + "ctrl-enter": "editor::Newline", + "ctrl-shift-enter": "editor::NewlineBelow" } }, { diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rs index 1e3a64c3a5..d584c575d2 100644 --- a/crates/vim/src/normal/search.rs +++ b/crates/vim/src/normal/search.rs @@ -296,5 +296,7 @@ mod test { cx.assert_editor_state("«oneˇ» one one one"); cx.simulate_keystrokes(["enter"]); cx.assert_editor_state("one «oneˇ» one one"); + cx.simulate_keystrokes(["shift-enter"]); + cx.assert_editor_state("«oneˇ» one one one"); } }