diff src/misc1.c @ 17781:04245f071792 v8.1.1887

patch 8.1.1887: the +cmdline_compl feature is not in the tiny version commit https://github.com/vim/vim/commit/0a52df50a0e8fce6f5e0eb5f5373dcd0fa24d83a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 18 22:26:31 2019 +0200 patch 8.1.1887: the +cmdline_compl feature is not in the tiny version Problem: The +cmdline_compl feature is not in the tiny version. Solution: Graduate the +cmdline_compl feature.
author Bram Moolenaar <Bram@vim.org>
date Sun, 18 Aug 2019 22:30:04 +0200
parents f12745505a23
children 0f7ae8010787
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -14,7 +14,7 @@
 #include "vim.h"
 #include "version.h"
 
-#if defined(FEAT_CMDL_COMPL) && defined(MSWIN)
+#if defined(MSWIN)
 # include <lm.h>
 #endif
 
@@ -24,10 +24,8 @@ static char_u *remove_tail(char_u *p, ch
 #define URL_SLASH	1		/* path_is_url() has found "://" */
 #define URL_BACKSLASH	2		/* path_is_url() has found ":\\" */
 
-/* All user names (for ~user completion as done by shell). */
-#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
+// All user names (for ~user completion as done by shell).
 static garray_T	ga_users;
-#endif
 
 /*
  * Count the size (in window cells) of the indent in the current line.
@@ -1715,13 +1713,11 @@ free_homedir(void)
     vim_free(homedir);
 }
 
-# ifdef FEAT_CMDL_COMPL
     void
 free_users(void)
 {
     ga_clear_strings(&ga_users);
 }
-# endif
 #endif
 
 /*
@@ -2366,7 +2362,6 @@ vim_setenv(char_u *name, char_u *val)
 #endif
 }
 
-#if defined(FEAT_CMDL_COMPL) || defined(PROTO)
 /*
  * Function given to ExpandGeneric() to obtain an environment variable name.
  */
@@ -2532,7 +2527,6 @@ match_user(char_u *name)
     }
     return result;
 }
-#endif
 
 /*
  * Replace home directory by "~" in each space or comma separated file name in
@@ -3868,7 +3862,6 @@ unix_expandpath(
 }
 #endif
 
-#if defined(FEAT_SEARCHPATH) || defined(FEAT_CMDL_COMPL) || defined(PROTO)
 /*
  * Sort "gap" and remove duplicate entries.  "gap" is expected to contain a
  * list of file names in allocated memory.
@@ -3890,7 +3883,6 @@ remove_duplicates(garray_T *gap)
 	    --gap->ga_len;
 	}
 }
-#endif
 
 /*
  * Return TRUE if "p" contains what looks like an environment variable.
@@ -4246,7 +4238,9 @@ addfile(
 }
 #endif /* !NO_EXPANDPATH */
 
-#if defined(VIM_BACKTICK) || defined(FEAT_EVAL) || defined(PROTO)
+#if defined(VIM_BACKTICK) || defined(FEAT_EVAL) \
+	|| (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \
+	|| defined(PROTO)
 
 #ifndef SEEK_SET
 # define SEEK_SET 0