summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ex_cmds.c7
-rw-r--r--src/ex_getln.c5
-rw-r--r--src/version.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index d700cc5373..c2dc267646 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -5897,12 +5897,17 @@ find_help_tags(arg, num_matches, matches, keep_lang)
flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
if (keep_lang)
flags |= TAG_KEEP_LANG;
- if (find_tags(IObuff, num_matches, matches, flags, TAG_MANY, NULL) == OK
+ if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK
&& *num_matches > 0)
+ {
/* Sort the matches found on the heuristic number that is after the
* tag name. */
qsort((void *)*matches, (size_t)*num_matches,
sizeof(char_u *), help_compare);
+ /* Delete more than TAG_MANY to reduce the size of the listing. */
+ while (*num_matches > TAG_MANY)
+ vim_free((*matches)[--*num_matches]);
+ }
return OK;
}
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 624bf1c8de..c9760d1dba 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4387,7 +4387,10 @@ ExpandFromContext(xp, pat, num_file, file, options)
*num_file = 0;
if (xp->xp_context == EXPAND_HELP)
{
- if (find_help_tags(pat, num_file, file, FALSE) == OK)
+ /* With an empty argument we would get all the help tags, which is
+ * very slow. Get matches for "help" instead. */
+ if (find_help_tags(*pat == NUL ? (char_u *)"help" : pat,
+ num_file, file, FALSE) == OK)
{
#ifdef FEAT_MULTI_LANG
cleanup_help_tags(*num_file, *file);
diff --git a/src/version.c b/src/version.c
index 77d550fe80..f105e72238 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 29,
+/**/
28,
/**/
27,