diff options
| author | Přemysl Eric Janouch <p@janouch.name> | 2021-10-28 08:18:15 +0200 | 
|---|---|---|
| committer | Přemysl Eric Janouch <p@janouch.name> | 2021-10-28 08:23:52 +0200 | 
| commit | e5ed89646be2a8242dad028e1eaa4241d4f1dda3 (patch) | |
| tree | d0ac6afa7a117eccf8083addd15e5b4ec948111f | |
| parent | 5e728f6d3132b5f0cae7a49fc340e13bc82f036d (diff) | |
| download | xK-e5ed89646be2a8242dad028e1eaa4241d4f1dda3.tar.gz xK-e5ed89646be2a8242dad028e1eaa4241d4f1dda3.tar.xz xK-e5ed89646be2a8242dad028e1eaa4241d4f1dda3.zip  | |
xC: fix newer libedit (2021-08-29)
| -rw-r--r-- | xC.c | 19 | 
1 files changed, 5 insertions, 14 deletions
@@ -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");  | 
