Ken Takata wrote:

> 2017/11/13 Mon 3:22:16 UTC+9 Bram Moolenaar wrote:
> > Patch 8.0.1295
> > Problem:    Cannot automatically get a server name in a terminal.
> > Solution:   Add the --enable-autoservername flag to configure. (Cimbali,
> >             closes #2317)
> > Files:      runtime/doc/eval.txt, runtime/doc/various.txt, src/config.h.in,
> >             src/configure.ac, src/auto/configure, src/evalfunc.c,
> >             src/feature.h, src/main.c, src/version.c, src/Makefile
> 
> With this patch, has('autoservername') returns 0 on Win32, and also :version
> shows -autoservername.  I think they should be 1 and +autoservername, because
> the feature is supported on Win32.
> 
> How about this patch?
> 
> --- a/src/feature.h
> +++ b/src/feature.h
> @@ -1172,7 +1172,11 @@
>   *                   when --servername is not passed on the command line.
>   */
>  #if defined(FEAT_CLIENTSERVER) && !defined(FEAT_AUTOSERVERNAME)
> -/* # define FEAT_AUTOSERVERNAME */
> +# ifdef WIN3264
> +#  define FEAT_AUTOSERVERNAME
> +# else
> +/* #  define FEAT_AUTOSERVERNAME */
> +# endif
>  #endif
>  
>  /*
> 
> 
> Another idea is changing the #ifdefs in evalfunc.c and version.c:
> 
> --- a/src/evalfunc.c
> +++ b/src/evalfunc.c
> @@ -5656,7 +5656,7 @@ f_has(typval_T *argvars, typval_T *rettv
>  #ifdef FEAT_AUTOCMD
>       "autocmd",
>  #endif
> -#ifdef FEAT_AUTOSERVERNAME
> +#if defined(FEAT_AUTOSERVERNAME) || defined(WIN3264)
>       "autoservername",
>  #endif
>  #ifdef FEAT_BEVAL
> diff --git a/src/version.c b/src/version.c
> --- a/src/version.c
> +++ b/src/version.c
> @@ -83,7 +83,7 @@ static char *(features[]) =
>  #else
>       "-autocmd",
>  #endif
> -#ifdef FEAT_AUTOSERVERNAME
> +#if defined(FEAT_AUTOSERVERNAME) || defined(WIN3264)
>       "+autoservername",
>  #else
>       "-autoservername",
> 
> 
> (I think the former one is better, though.)

Yes.  I'll add comments, otherwise it may be confusing.

-- 
I once paid $12 to peer at the box that held King Tutankhamen's little
bandage-covered midget corpse at the De Young Museum in San Francisco.  I
remember thinking how pleased he'd be about the way things turned out in his
afterlife.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui