Mercurial > vim
diff src/misc1.c @ 20277:8a694c9447d7 v8.2.0694
patch 8.2.0694: Haiku: channel and terminal do not work
Commit: https://github.com/vim/vim/commit/80a8d3889bf1341c47f1c88c59825f183b2b4753
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 3 22:57:32 2020 +0200
patch 8.2.0694: Haiku: channel and terminal do not work
Problem: Haiku: channel and terminal do not work.
Solution: Close files when the job has finished. (Ozaki Kiichi,
closes #6039)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 03 May 2020 23:00:04 +0200 |
parents | aadd1cae2ff5 |
children | d636f5e76347 |
line wrap: on
line diff
--- 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; /*