Commit c1bb6485 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: check for the type of terminal far earlier

So the result could be used during RC-file reading.
No related merge requests found
Showing with 5 additions and 5 deletions
+5 -5
...@@ -1980,6 +1980,11 @@ int main(int argc, char **argv) ...@@ -1980,6 +1980,11 @@ int main(int argc, char **argv)
{NULL, 0, NULL, 0} {NULL, 0, NULL, 0}
}; };
#ifdef __linux__
/* Check whether we're running on a Linux console. */
console = (getenv("DISPLAY") == NULL);
#endif
/* Back up the terminal settings so that they can be restored. */ /* Back up the terminal settings so that they can be restored. */
tcgetattr(0, &oldterm); tcgetattr(0, &oldterm);
...@@ -2471,11 +2476,6 @@ int main(int argc, char **argv) ...@@ -2471,11 +2476,6 @@ int main(int argc, char **argv)
/* Set up the terminal state. */ /* Set up the terminal state. */
terminal_init(); terminal_init();
#ifdef __linux__
/* Check whether we're running on a Linux console. */
console = (getenv("DISPLAY") == NULL);
#endif
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "Main: set up windows\n"); fprintf(stderr, "Main: set up windows\n");
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment