On Friday, July 27, 2018 at 12:50:44 AM UTC-4, Tony Mechelynck wrote:
> On Fri, Jul 27, 2018 at 3:41 AM, <[email protected]> wrote:
> > If Vim is built with the 'autochdir' feature defined, it is not reported as
> > such by the ":version" command and has('autochdir') returns zero.
>
> Maybe this is only a documentation error under :help 'autochdir' ?
> Such a feature is also not mentioned under :h feature-list and :h
> +feature-list.
However, AUTOCHDIR is listed as a "feature" in feature.h so I would think it
should included in feature-list and therefore should be recognized by has() and
:version. Why should some "features" be recognized and not others?
>
> AFAICT, Huge, Big and Normal builds return 1 as the value of
> exists('+autochdir'), and neither exists() nor has() can be tested in
> Small and Tiny builds, which lack expression evaluation.
My experience is different. Here's the full disclosure.
I always build Vim under Windows using mingw and specify FEATURES=NORMAL. I
wanted to have the 'autochdir' feature but did not want to build with BIG
features because I have no use for 'rightleft', 'farsi', and others. So I
added -DFEAT_AUTOCHDIR to the make variable DEFINES in Make_cyg_ming.mak. I
was able to build without error and all tests passed. To make sure that the
'autochdir' feature was included, I tried has() and :version and saw that it
was not listed. An investigation into why then lead to my proposed patches.
-mike
>
>
> Best regards,
> Tony.
>
>
>
> >
> > The following diffs show my proposed patches:
> >
> > $ git diff evalfunc.c
> > diff --git a/src/evalfunc.c b/src/evalfunc.c
> > index a9f6c5b8a..ae849be2f 100644
> > --- a/src/evalfunc.c
> > +++ b/src/evalfunc.c
> > @@ -6045,6 +6045,9 @@ f_has(typval_T *argvars, typval_T *rettv)
> > "arabic",
> > #endif
> > "autocmd",
> > +#ifdef FEAT_AUTOCHDIR
> > + "autochdir",
> > +#endif
> > #ifdef FEAT_AUTOSERVERNAME
> > "autoservername",
> > #endif
> > $
> > $ git diff version.c
> > diff --git a/src/version.c b/src/version.c
> > index 830de26fc..abc7bf8df 100644
> > --- a/src/version.c
> > +++ b/src/version.c
> > @@ -101,6 +101,11 @@ static char *(features[]) =
> > "-arabic",
> > #endif
> > "+autocmd",
> > +#ifdef FEAT_AUTOCHDIR
> > + "+autochdir",
> > +#else
> > + "-autochdir",
> > +#endif
> > #ifdef FEAT_AUTOSERVERNAME
> > "+autoservername",
> > #else
> >
> > --
> > --
> > 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.
--
--
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.