direct: no setupterm() for windows #2009

dankamongmen/iterm2complete
nick black 3 years ago committed by nick black
parent 69024e6b3a
commit 3b247c37d6

@ -861,11 +861,14 @@ ncdirect* ncdirect_core_init(const char* termtype, FILE* outfp, uint64_t flags){
} }
// we don't need a controlling tty for everything we do; allow a failure here // we don't need a controlling tty for everything we do; allow a failure here
ret->ctermfd = get_tty_fd(ret->ttyfp); ret->ctermfd = get_tty_fd(ret->ttyfp);
// FIXME factor this out, and share it with rendered mode #2023
#ifndef __MINGW__
int termerr; int termerr;
if(setupterm(termtype, ret->ctermfd, &termerr)){ if(setupterm(termtype, ret->ctermfd, &termerr)){
fprintf(stderr, "Terminfo error %d (see terminfo(3ncurses))\n", termerr); fprintf(stderr, "Terminfo error %d (see terminfo(3ncurses))\n", termerr);
goto err; goto err;
} }
#endif
int cursor_y = -1; int cursor_y = -1;
int cursor_x = -1; int cursor_x = -1;
if(interrogate_terminfo(&ret->tcache, ret->ctermfd, utf8, if(interrogate_terminfo(&ret->tcache, ret->ctermfd, utf8,

Loading…
Cancel
Save