From 2d30b6d1154771e194476e136ae341e46f6e08d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Tue, 6 Sep 2022 16:40:31 +0200 Subject: [PATCH] xC: define critical bindings after el_source() And use ^C rather than ^G. --- xC.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xC.c b/xC.c index 6d37ece..75e5ea8 100644 --- a/xC.c +++ b/xC.c @@ -1032,7 +1032,7 @@ input_el__restore (struct input_el *self) static void input_el__start_over (struct input_el *self) { - wchar_t x[] = { L'g' & 31, 0 }; + wchar_t x[] = { L'c' & 31, 0 }; el_wpush (self->editline, x); int dummy_count = 0; @@ -14527,12 +14527,6 @@ app_editline_init (struct input_el *self) // Just what are you doing? CALL_ (input, bind_control, 'u', "vi-kill-line-prev"); - // See input_el__redisplay(), functionally important - CALL_ (input, bind_control, 'q', "ed-redisplay"); - // This is what buffered el_wgets() does, functionally important; - // perhaps it could be bound somewhere more appropriate - CALL_ (input, bind_control, 'g', "ed-start-over"); - // We need to hide the prompt and input first CALL_ (input, bind, "\r", "send-line"); CALL_ (input, bind, "\n", "send-line"); @@ -14541,6 +14535,11 @@ app_editline_init (struct input_el *self) // Source the user's defaults file el_source (self->editline, NULL); + + // See input_el__redisplay(), functionally important + CALL_ (input, bind_control, 'q', "ed-redisplay"); + // This is what buffered el_wgets() does, functionally important + CALL_ (input, bind_control, 'c', "ed-start-over"); } #endif // HAVE_EDITLINE