diff options
author | Bram Moolenaar <Bram@vim.org> | 2006-03-28 21:08:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2006-03-28 21:08:56 +0000 |
commit | d2cec5b043361ee798a0522244135f4ea87838f6 (patch) | |
tree | 3ad43aed8a8c373f85a2a3adf286b045c14f6cfe /src/main.c | |
parent | 607a95ed81973faab2e1c3d9c91822082694fdc3 (diff) | |
download | vim-git-d2cec5b043361ee798a0522244135f4ea87838f6.tar.gz |
updated for version 7.0c02v7.0c02
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index aff8b3fb3..32f91156d 100644 --- a/src/main.c +++ b/src/main.c @@ -449,7 +449,24 @@ main * message box. isatty(2) returns TRUE anyway, thus we need to check the * name to know we're not started from a terminal. */ if (gui.starting && (!isatty(2) || strcmp("/dev/console", ttyname(2)) == 0)) + { params.want_full_screen = FALSE; + + /* Avoid always using "/" as the current directory. Note that when + * started from Finder the arglist will be filled later in + * HandleODocAE() and "fname" will be NULL. */ + if (getcwd((char *)NameBuff, MAXPATHL) != NULL + && STRCMP(NameBuff, "/") == 0) + { + if (fname != NULL) + (void)vim_chdirfile(fname); + else + { + expand_env((char_u *)"$HOME", NameBuff, MAXPATHL); + vim_chdir(NameBuff); + } + } + } #endif /* |