aboutsummaryrefslogtreecommitdiff
path: root/json-rpc-shell.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-09 20:21:52 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-10-09 20:21:52 +0200
commit84702fa47da5d2d4e872245a907a282fadccbc22 (patch)
treefc8deda827bb8903bddcab5e54746f18984df7f4 /json-rpc-shell.c
parentb315892249c834654f5b80856a0e2e3b6dff5273 (diff)
downloadjson-rpc-shell-84702fa47da5d2d4e872245a907a282fadccbc22.tar.gz
json-rpc-shell-84702fa47da5d2d4e872245a907a282fadccbc22.tar.xz
json-rpc-shell-84702fa47da5d2d4e872245a907a282fadccbc22.zip
Fix handling terminal resizes while the terminal is suspended
GNU Readline has a misfeature.
Diffstat (limited to 'json-rpc-shell.c')
-rw-r--r--json-rpc-shell.c2
1 files changed, 2 insertions, 0 deletions
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);
}