Change TUI resize to use an extended terminal capability.

... rather than hardwiring the string and testing the terminal
type every time the screen is re-sized.
This commit is contained in:
Jonathan de Boyne Pollard
2017-05-05 15:17:32 +01:00
parent fd07250e6c
commit d5468d3cde

View File

@@ -1132,11 +1132,11 @@ static void fix_terminfo(TUIData *data)
}
// Only define this capability for terminal types that we know understand it.
if (data->term == kTermDTTerm // originated this extension
|| data->term == kTermXTerm // per xterm ctlseqs doc
|| data->term == kTermKonsole // per commentary in VT102Emulation.cpp
|| data->term == kTermTeraTerm // per "Supported Control Functions" doc
|| data->term == kTermRxvt) { // per command.C
if (data->term == kTermDTTerm // originated this extension
|| data->term == kTermXTerm // per xterm ctlseqs doco
|| data->term == kTermKonsole // per commentary in VT102Emulation.cpp
|| data->term == kTermTeraTerm // per TeraTerm "Supported Control Functions" doco
|| data->term == kTermRxvt) { // per command.C
data->unibi_ext.resize_screen = (int)unibi_add_ext_str(ut, NULL,
"\x1b[8;%p1%d;%p2%dt");
}