0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

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.
This commit is contained in:
Bram Moolenaar
2019-08-18 22:26:31 +02:00
parent 66b51420e0
commit 0a52df50a0
29 changed files with 37 additions and 198 deletions

View File

@@ -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, char_u *pend, char_u *name);
#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