Hi Axel!
On So, 21 Feb 2016, Axel Bender wrote:
> Yup, at 1379 here.
Yes, I see the problem. It's caused by having :set acd change to the
directory of the first buffer when initializing the options. Later we
call fix_arg_enc() which tries to guess the filenames again, butt since
'autochdir' has switched the working directory already, it tries to
switch to the directory again, e.g. if the directory src/file1 is given,
will try to edit src/src/file1.
I think a proper fix is to skip changing the directory, if Vim is still
starting up. It will get done later in edit_buffers() anyhow (and then
later in win_enter_ext() again), so I think we can safely skip it, which
is what the following patch does:
diff -r c3a233d90eca src/buffer.c
--- a/src/buffer.c Sun Feb 21 23:15:06 2016 +0100
+++ b/src/buffer.c Mon Feb 22 14:37:20 2016 +0100
@@ -1621,7 +1621,8 @@
void
do_autochdir(void)
{
- if (curbuf->b_ffname != NULL && vim_chdirfile(curbuf->b_ffname) == OK)
+ if (starting == 0 && curbuf->b_ffname != NULL &&
+ vim_chdirfile(curbuf->b_ffname) == OK)
shorten_fnames(TRUE);
}
#endif
Best,
Christian
--
Was wäre das Leben, hätten wir nicht den Mut, etwas zu riskieren?
-- Vincent Willem van Gogh
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.