don't try to preserve termios sans terminal

pull/1706/head
nick black 3 years ago committed by Nick Black
parent a4337ef144
commit a0130a88e6

@ -186,10 +186,12 @@ int interrogate_terminfo(tinfo* ti, int fd, const char* termname, unsigned utf8,
unsigned noaltscreen, unsigned nocbreak){
memset(ti, 0, sizeof(*ti));
ti->utf8 = utf8;
if(fd >= 0){
if(tcgetattr(fd, &ti->tpreserved)){
fprintf(stderr, "Couldn't preserve terminal state for %d (%s)\n", fd, strerror(errno));
return -1;
}
}
if(ncinputlayer_init(&ti->input, stdin)){
return -1;
}

Loading…
Cancel
Save