summaryrefslogtreecommitdiffstats
path: root/src/misc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc1.c')
-rw-r--r--src/misc1.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/misc1.c b/src/misc1.c
index 92aa82fc42..6686a35146 100644
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -1666,23 +1666,25 @@ vim_getenv(char_u *name, int *mustfree)
if (p != NULL)
return p;
+
+# ifdef __HAIKU__
+ // special handling for user settings directory...
+ if (STRCMP(name, "BE_USER_SETTINGS") == 0)
+ {
+ static char userSettingsPath[MAXPATHL];
+
+ if (find_directory(B_USER_SETTINGS_DIRECTORY, 0, false,
+ userSettingsPath, MAXPATHL) == B_OK)
+ return (char_u *)userSettingsPath;
+ else
+ return NULL;
+ }
+# endif
#endif
// handling $VIMRUNTIME and $VIM is below, bail out if it's another name.
vimruntime = (STRCMP(name, "VIMRUNTIME") == 0);
if (!vimruntime && STRCMP(name, "VIM") != 0)
-#if defined(__HAIKU__)
- // special handling for user settings directory...
- if (STRCMP(name, "BE_USER_SETTINGS") == 0)
- {
- static char userSettingsPath[MAXPATHL] = {0};
-
- if (B_OK == find_directory(B_USER_SETTINGS_DIRECTORY, 0,
- false, userSettingsPath, MAXPATHL))
- return userSettingsPath;
- }
- else
-#endif
return NULL;
/*