Skip to content

Commit

Permalink
direct: no setupterm() for windows #2009
Browse files Browse the repository at this point in the history
  • Loading branch information
dankamongmen committed Aug 5, 2021
1 parent 367c613 commit bdca0e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
ret->ctermfd = get_tty_fd(ret->ttyfp);
// FIXME factor this out, and share it with rendered mode #2023
#ifndef __MINGW__
int termerr;
if(setupterm(termtype, ret->ctermfd, &termerr)){
fprintf(stderr, "Terminfo error %d (see terminfo(3ncurses))\n", termerr);
goto err;
}
#endif
int cursor_y = -1;
int cursor_x = -1;
if(interrogate_terminfo(&ret->tcache, ret->ctermfd, utf8,
Expand Down

0 comments on commit bdca0e0

Please sign in to comment.