1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

Merge pull request #276 from LemonBoy/terminfo-application-mode

Send smkx/rmkx sequence at terminal init
This commit is contained in:
Alexander Færøy 2015-09-09 22:55:24 +02:00
commit 762c1d7f2c
2 changed files with 63 additions and 48 deletions

View File

@ -106,6 +106,10 @@ static TERMINFO_REC tcaps[] = {
/* Beep */
{ "bel", "bl", CAP_TYPE_STR, G_STRUCT_OFFSET(TERM_REC, TI_bel) },
/* Keyboard-transmit mode */
{ "smkx", "ks", CAP_TYPE_STR, G_STRUCT_OFFSET(TERM_REC, TI_smkx) },
{ "rmkx", "ke", CAP_TYPE_STR, G_STRUCT_OFFSET(TERM_REC, TI_rmkx) },
};
/* Move cursor (cursor_address / cup) */
@ -524,6 +528,10 @@ void terminfo_cont(TERM_REC *term)
{
if (term->TI_smcup)
tput(tparm(term->TI_smcup));
if (term->TI_smkx)
tput(tparm(term->TI_smkx));
terminfo_input_init(term);
}
@ -538,6 +546,9 @@ void terminfo_stop(TERM_REC *term)
if (term->TI_rmcup)
tput(tparm(term->TI_rmcup));
if (term->TI_rmkx)
tput(tparm(term->TI_rmkx));
/* reset input settings */
terminfo_input_deinit(term);
fflush(term->out);

View File

@ -88,6 +88,10 @@ struct _TERM_REC {
/* Beep */
char *TI_bel;
/* Keyboard-transmit mode */
const char *TI_smkx;
const char *TI_rmkx;
};
extern TERM_REC *current_term;