forked from aniani/vim
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)
This commit is contained in:
26
src/misc1.c
26
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;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user