diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-05-03 22:57:32 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-05-03 22:57:32 +0200 |
commit | 80a8d3889bf1341c47f1c88c59825f183b2b4753 (patch) | |
tree | 09cf69c6e3dc3f8513badc8ec99dd593ceb7842d /src/misc1.c | |
parent | 2fd4cd755c3e87e733b7363ac13e5c0fe0297a80 (diff) | |
download | vim-git-80a8d3889bf1341c47f1c88c59825f183b2b4753.tar.gz |
patch 8.2.0694: Haiku: channel and terminal do not workv8.2.0694
Problem: Haiku: channel and terminal do not work.
Solution: Close files when the job has finished. (Ozaki Kiichi,
closes #6039)
Diffstat (limited to 'src/misc1.c')
-rw-r--r-- | src/misc1.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/misc1.c b/src/misc1.c index 92aa82fc4..6686a3514 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; /* |