only invoke smkx when attached to a tty

pull/2041/head
nick black 3 years ago
parent 5bff834407
commit 4904740832
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -786,12 +786,14 @@ int interrogate_terminfo(tinfo* ti, const char* termtype, FILE* out, unsigned ut
logpanic("Required terminfo capability 'cup' not defined\n");
goto err;
}
// if the keypad neen't be explicitly enabled, smkx is not present
const char* smkx = get_escape(ti, ESCAPE_SMKX);
if(smkx){
if(tty_emit(tiparm(smkx), ti->ttyfd) < 0){
logpanic("Error enabling keypad transmit mode\n");
goto err;
if(ti->ttyfd >= 0){
// if the keypad neen't be explicitly enabled, smkx is not present
const char* smkx = get_escape(ti, ESCAPE_SMKX);
if(smkx){
if(tty_emit(tiparm(smkx), ti->ttyfd) < 0){
logpanic("Error enabling keypad transmit mode\n");
goto err;
}
}
}
if(ti->caps.colors > 1){

Loading…
Cancel
Save