mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-25 02:32:16 +03:00
tweaks: check for the type of terminal far earlier
So the result could be used during RC-file reading.
This commit is contained in:
parent
4bcce96a4f
commit
c1bb6485de
10
src/nano.c
10
src/nano.c
@ -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)
|
|||||||
/* 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
|
||||||
|
Loading…
Reference in New Issue
Block a user