mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Send smkx/rmkx sequence at terminal init
Enter the "application" mode when setting up the terminal, this improves the compatiblity with the standards; as a side effect now DEL key works ootb when irssi is run in the suckless's st terminal.
This commit is contained in:
parent
e948aaa4ba
commit
b5b73cb471
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user