fix(ui): re-organize tty fd handling and fix issues

- Use the correct fd to replace stdin on windows (CONIN)
- Don't start the TUI if there are no tty fd (not a regression,
  but makes sense regardless)
- De-mythologize "global input fd". it is just STDIN.
This commit is contained in:
bfredl
2023-01-10 14:03:15 +01:00
parent 43feb973e3
commit 160c69b655
10 changed files with 49 additions and 63 deletions

View File

@@ -30,10 +30,7 @@ typedef struct {
char *tagname; // tag from -t argument
char *use_ef; // 'errorfile' from -q argument
bool input_isatty; // stdin is a terminal
bool input_istext; // stdin is text, not executable (-E/-Es)
bool output_isatty; // stdout is a terminal
bool err_isatty; // stderr is a terminal
int no_swap_file; // "-n" argument used
int use_debug_break_level;