diff options
author | Bram Moolenaar <Bram@vim.org> | 2008-08-06 13:03:07 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2008-08-06 13:03:07 +0000 |
commit | c62e2fe59e06224fcf2fc4fa701be5c3bc25d984 (patch) | |
tree | 4a273e99e8337453322c80f9f40f637f609a8a45 /src/ex_cmds.c | |
parent | 1b8d33b6b262e64433c37399482f3a735eb8adac (diff) | |
download | vim-git-c62e2fe59e06224fcf2fc4fa701be5c3bc25d984.tar.gz |
updated for version 7.2b-029v7.2b.029
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index d700cc537..c2dc26764 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; } |