diff --git a/editor.c b/editor.c index 536e432..3302b79 100644 --- a/editor.c +++ b/editor.c @@ -1984,11 +1984,13 @@ static void _editor_init_kmaps(editor_t *editor) { MLE_KBINDING_DEF("_editor_prompt_isearch_viewport_up", "pgup"), MLE_KBINDING_DEF("_editor_prompt_isearch_viewport_down", "pgdn"), MLE_KBINDING_DEF("_editor_prompt_isearch_drop_cursors", "C-/"), - MLE_KBINDING_DEF("_editor_prompt_cancel", "enter"), - MLE_KBINDING_DEF("_editor_prompt_cancel", "M-enter"), - MLE_KBINDING_DEF("_editor_prompt_cancel", "C-c"), - MLE_KBINDING_DEF("_editor_prompt_cancel", "C-x"), - MLE_KBINDING_DEF("_editor_prompt_cancel", "M-c"), + MLE_KBINDING_DEF("_editor_prompt_input_submit", "enter"), + MLE_KBINDING_DEF("_editor_prompt_input_submit", "M-enter"), + MLE_KBINDING_DEF("_editor_prompt_input_submit", "C-c"), + MLE_KBINDING_DEF("_editor_prompt_input_submit", "C-x"), + MLE_KBINDING_DEF("_editor_prompt_input_submit", "M-c"), + MLE_KBINDING_DEF("_editor_prompt_history_up", "C-p"), + MLE_KBINDING_DEF("_editor_prompt_history_down", "C-n"), MLE_KBINDING_DEF(NULL, NULL) }); } diff --git a/tests/func/test_search_replace.sh b/tests/func/test_search_replace.sh index 44c6f52..9048f54 100755 --- a/tests/func/test_search_replace.sh +++ b/tests/func/test_search_replace.sh @@ -56,13 +56,20 @@ expected[rfind_cursor_line]='^bview.0.cursor.0.mark.line_index=1$' expected[rfind_cursor_col ]='^bview.0.cursor.0.mark.col=0$' source 'test.sh' -# cmd_isearch +# cmd_isearch 1 macro='a c t o r enter a p p l e enter a p p e t i t e enter a z u r e M-\ C-r a p p e enter' declare -A expected expected[isearch_cursor_line]='^bview.0.cursor.0.mark.line_index=2$' expected[iesarch_cursor_col ]='^bview.0.cursor.0.mark.col=0$' source 'test.sh' +# cmd_isearch 2 +macro='i enter a enter b enter a enter b M-\ C-r a enter C-r b enter C-r C-n C-n' +declare -A expected +expected[isearch_cursor_line]='^bview.0.cursor.0.mark.line_index=3$' +expected[iesarch_cursor_col ]='^bview.0.cursor.0.mark.col=0$' +source 'test.sh' + # cmd_replace 1 macro='a 1 space b 2 space c 3 space d 4 C-t \ d + enter x enter y n a' declare -A expected