diff options
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/option.c b/src/option.c index 8daac5b5e1..e257186cf2 100644 --- a/src/option.c +++ b/src/option.c @@ -67,6 +67,7 @@ #include "ui.h" #include "undo.h" #include "window.h" +#include "os/os.h" /* * The options that are local to a window or buffer have "indir" set to one of @@ -1961,7 +1962,7 @@ void set_init_1(void) { p_cp = TRUE; /* Use POSIX compatibility when $VIM_POSIX is set. */ - if (mch_getenv((char_u *)"VIM_POSIX") != NULL) { + if (mch_getenv("VIM_POSIX") != NULL) { set_string_default("cpo", (char_u *)CPO_ALL); set_string_default("shm", (char_u *)"A"); } @@ -1970,7 +1971,7 @@ void set_init_1(void) { * Find default value for 'shell' option. * Don't use it if it is empty. */ - if (((p = mch_getenv((char_u *)"SHELL")) != NULL && *p != NUL) + if (((p = (char_u *)mch_getenv("SHELL")) != NULL && *p != NUL) ) set_string_default("sh", p); @@ -2170,7 +2171,7 @@ void set_init_1(void) { * NOTE: mlterm's author is being asked to 'set' a variable * instead of an environment variable due to inheritance. */ - if (mch_getenv((char_u *)"MLTERM") != NULL) + if (mch_getenv("MLTERM") != NULL) set_option_value((char_u *)"tbidi", 1L, NULL, 0); /* Parse default for 'fillchars'. */ @@ -2447,7 +2448,7 @@ static char_u *term_bg_default(void) { || STRCMP(T_NAME, "screen.linux") == 0 || STRCMP(T_NAME, "cygwin") == 0 || STRCMP(T_NAME, "putty") == 0 - || ((p = mch_getenv((char_u *)"COLORFGBG")) != NULL + || ((p = (char_u *)mch_getenv("COLORFGBG")) != NULL && (p = vim_strrchr(p, ';')) != NULL && ((p[1] >= '0' && p[1] <= '6') || p[1] == '8') && p[2] == NUL)) |