aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xC.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/xC.c b/xC.c
index 6bba09a..6264b8c 100644
--- a/xC.c
+++ b/xC.c
@@ -771,24 +771,13 @@ struct input_el
static void app_editline_init (struct input_el *self);
-static int
-input_el__get_termios (int character, int fallback)
-{
- if (!g_terminal.initialized)
- return fallback;
-
- cc_t value = g_terminal.termios.c_cc[character];
- if (value == _POSIX_VDISABLE)
- return fallback;
- return value;
-}
-
static void
input_el__redisplay (void *input)
{
- // See rl_redisplay()
+ // See rl_redisplay(), however NetBSD editline's map.c v1.54 breaks VREPRINT
+ // so we bind redisplay somewhere else in app_editline_init()
struct input_el *self = input;
- char x[] = { input_el__get_termios (VREPRINT, 'R' - 0x40), 0 };
+ char x[] = { 'q' & 31, 0 };
el_push (self->editline, x);
// We have to do this or it gets stuck and nothing is done
@@ -13782,6 +13771,8 @@ app_editline_init (struct input_el *self)
CALL_ (input, bind_control, 'w', "ed-delete-prev-word");
// 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");
// We need to hide the prompt and input first
CALL_ (input, bind, "\n", "send-line");