xC: define critical bindings after el_source()
And use ^C rather than ^G.
This commit is contained in:
parent
cf14cb8122
commit
2d30b6d115
13
xC.c
13
xC.c
|
@ -1032,7 +1032,7 @@ input_el__restore (struct input_el *self)
|
||||||
static void
|
static void
|
||||||
input_el__start_over (struct input_el *self)
|
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);
|
el_wpush (self->editline, x);
|
||||||
|
|
||||||
int dummy_count = 0;
|
int dummy_count = 0;
|
||||||
|
@ -14527,12 +14527,6 @@ app_editline_init (struct input_el *self)
|
||||||
// Just what are you doing?
|
// Just what are you doing?
|
||||||
CALL_ (input, bind_control, 'u', "vi-kill-line-prev");
|
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
|
// We need to hide the prompt and input first
|
||||||
CALL_ (input, bind, "\r", "send-line");
|
CALL_ (input, bind, "\r", "send-line");
|
||||||
CALL_ (input, bind, "\n", "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
|
// Source the user's defaults file
|
||||||
el_source (self->editline, NULL);
|
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
|
#endif // HAVE_EDITLINE
|
||||||
|
|
Loading…
Reference in New Issue