diff options
author | Michael Ennen <mike.ennen@gmail.com> | 2016-04-27 15:18:42 -0700 |
---|---|---|
committer | Michael Ennen <mike.ennen@gmail.com> | 2016-04-27 16:28:38 -0700 |
commit | c0de12c3c5f8a19172b4faeda89d01003ae03a71 (patch) | |
tree | f777fa2e337b274094d9f7dd43c675f05220b8ed /src | |
parent | e861af85f89e119193a9e219a4cb766757e28e5a (diff) | |
download | rneovim-c0de12c3c5f8a19172b4faeda89d01003ae03a71.tar.gz rneovim-c0de12c3c5f8a19172b4faeda89d01003ae03a71.tar.bz2 rneovim-c0de12c3c5f8a19172b4faeda89d01003ae03a71.zip |
vim-patch: 7.4.1401
Problem: Having 'autochdir' set during startup and using diff mode doesn't
work. (Axel Bender)
Solution: Don't use 'autochdir' while still starting up. (Christian
Brabandt)
https://github.com/vim/vim/commit/6bd364e08461159ad3c153ffba4def5b896486a1
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/buffer.c | 11 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 7 insertions, 6 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); } } } diff --git a/src/nvim/version.c b/src/nvim/version.c index a492c8d7ec..c473bb6d46 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -276,7 +276,7 @@ static int included_patches[] = { // 1404 NA // 1403 NA // 1402 NA - // 1401, + 1401, // 1400 NA // 1399 NA // 1398 NA |