Commit 20bbbda8 authored by Andrew Price's avatar Andrew Price

Explicitly tell readline when the term size changes

Apparently this is required since readline 6.3
parent 3ae066f0
Pipeline #498 failed with stage
in 6 minutes and 38 seconds
......@@ -279,13 +279,15 @@ static int match_arg_str(char *srch, const char *sub)
}
static void termcap_screenchange(int n)
static void handle_sigwinch(int n)
{
/* termcap not available */
if (g_boTermCap == 0) return;
/* reinitialise termcap */
tgetent(NULL, getenv("TERM"));
if (UseRL)
rl_resize_terminal();
}
......@@ -320,7 +322,7 @@ static void init_termcap(void)
g_boTermCap = 1;
/* set up a signal for screen size change, to allow termcap to be reinitialised */
signal(SIGWINCH, termcap_screenchange);
signal(SIGWINCH, handle_sigwinch);
}
static char *dummy_list(const char *text, int state)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment