From 84702fa47da5d2d4e872245a907a282fadccbc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Fri, 9 Oct 2020 20:21:52 +0200 Subject: Fix handling terminal resizes while the terminal is suspended GNU Readline has a misfeature. --- json-rpc-shell.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 7e7be25..00b48c2 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -268,6 +268,7 @@ input_rl_start (struct input *input, const char *program_name) rl_readline_name = slash ? ++slash : program_name; rl_startup_hook = input_rl_on_startup; rl_catch_sigwinch = false; + rl_change_environment = false; hard_assert (self->prompt != NULL); rl_callback_handler_install (self->prompt, input_rl_on_input); @@ -2714,6 +2715,7 @@ static void resume_terminal (struct app_context *ctx) { ctx->input->vtable->prepare (ctx->input, true); + ctx->input->vtable->on_terminal_resized (ctx->input); ev_io_start (EV_DEFAULT_ &ctx->tty_watcher); ctx->input->vtable->show (ctx->input); } -- cgit v1.2.3