aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-04-27 23:16:54 -0400
committerJustin M. Keyes <justinkz@gmail.com>2016-04-27 23:16:54 -0400
commit860a0194a4bf699afbf07e85ddeac72a946cf23f (patch)
tree5ac157fdb880b4886e4a4915441b1f792a8456c2 /src/nvim/buffer.c
parentef4c0070cee64ab18529e76d87b4f20f3d6dabfe (diff)
parentc0de12c3c5f8a19172b4faeda89d01003ae03a71 (diff)
downloadrneovim-860a0194a4bf699afbf07e85ddeac72a946cf23f.tar.gz
rneovim-860a0194a4bf699afbf07e85ddeac72a946cf23f.tar.bz2
rneovim-860a0194a4bf699afbf07e85ddeac72a946cf23f.zip
Merge pull request #4661 from brcolow/vim-7.4.1401
vim-patch: 7.4.1401
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 529d0889bd..6ed5b3136f 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -1294,14 +1294,15 @@ void enter_buffer(buf_T *buf)
redraw_later(NOT_VALID);
}
-/*
- * Change to the directory of the current buffer.
- */
+// Change to the directory of the current buffer.
+// Don't do this while still starting up.
void do_autochdir(void)
{
if (p_acd) {
- if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK) {
- shorten_fnames(TRUE);
+ if (starting == 0
+ && curbuf->b_ffname != NULL
+ && vim_chdirfile(curbuf->b_ffname) == OK) {
+ shorten_fnames(true);
}
}
}