From 777638049b7ea4187b152d70ccc9d38d91948b2e Mon Sep 17 00:00:00 2001 From: sigoden Date: Sun, 23 Jun 2024 19:31:29 +0800 Subject: refactor: minor improvement (#638) --- src/repl/mod.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/repl') diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 1df3fdb..8083820 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -123,7 +123,7 @@ lazy_static! { "Include files with the message", AssertState::pass() ), - ReplCommand::new(".continue", "Continue response", AssertState::pass()), + ReplCommand::new(".continue", "Continue the response", AssertState::pass()), ReplCommand::new( ".regenerate", "Regenerate the last response", @@ -443,6 +443,16 @@ Type ".help" for additional help. KeyCode::Enter, ReedlineEvent::Edit(vec![EditCommand::InsertNewline]), ); + keybindings.add_binding( + KeyModifiers::SHIFT, + KeyCode::Enter, + ReedlineEvent::Edit(vec![EditCommand::InsertNewline]), + ); + keybindings.add_binding( + KeyModifiers::ALT, + KeyCode::Enter, + ReedlineEvent::Edit(vec![EditCommand::InsertNewline]), + ); } fn create_edit_mode(config: &GlobalConfig) -> Box { -- cgit v1.2.3