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

Explicitly tell readline when the term size changes

Apparently this is required since readline 6.3
parent 3ae066f0
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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)