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

@@ -494,6 +494,9 @@ EXTERN int v_dying INIT(= 0);
EXTERN bool stdin_isatty INIT(= true);
// is stdout a terminal?
EXTERN bool stdout_isatty INIT(= true);
// is stderr a terminal?
EXTERN bool stderr_isatty INIT(= true);
/// filedesc set by embedder for reading first buffer like `cmd | nvim -`
EXTERN int stdin_fd INIT(= -1);