Mercurial > vim
diff src/ex_cmds.c @ 1696:0c4a465bd741 v7.2b.029
updated for version 7.2b-029
author | vimboss |
---|---|
date | Wed, 06 Aug 2008 13:03:07 +0000 |
parents | b2e037ed7e33 |
children | 7b258a166daa |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5897,12 +5897,17 @@ find_help_tags(arg, num_matches, matches 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; }