mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
Add completion for :checkhealth
This commit is contained in:
@@ -4257,20 +4257,20 @@ addstar (
|
||||
* use with vim_regcomp(). First work out how long it will be:
|
||||
*/
|
||||
|
||||
/* For help tags the translation is done in find_help_tags().
|
||||
* For a tag pattern starting with "/" no translation is needed. */
|
||||
// For help tags the translation is done in find_help_tags().
|
||||
// For a tag pattern starting with "/" no translation is needed.
|
||||
if (context == EXPAND_HELP
|
||||
|| context == EXPAND_CHECKHEALTH
|
||||
|| context == EXPAND_COLORS
|
||||
|| context == EXPAND_COMPILER
|
||||
|| context == EXPAND_OWNSYNTAX
|
||||
|| context == EXPAND_FILETYPE
|
||||
|| context == EXPAND_PACKADD
|
||||
|| ((context == EXPAND_TAGS_LISTFILES
|
||||
|| context == EXPAND_TAGS)
|
||||
&& fname[0] == '/'))
|
||||
|| ((context == EXPAND_TAGS_LISTFILES || context == EXPAND_TAGS)
|
||||
&& fname[0] == '/')) {
|
||||
retval = vim_strnsave(fname, len);
|
||||
else {
|
||||
new_len = len + 2; /* +2 for '^' at start, NUL at end */
|
||||
} else {
|
||||
new_len = len + 2; // +2 for '^' at start, NUL at end
|
||||
for (i = 0; i < len; i++) {
|
||||
if (fname[i] == '*' || fname[i] == '~')
|
||||
new_len++; /* '*' needs to be replaced by ".*"
|
||||
@@ -4667,6 +4667,10 @@ ExpandFromContext (
|
||||
char *directories[] = { "syntax", "indent", "ftplugin", NULL };
|
||||
return ExpandRTDir(pat, 0, num_file, file, directories);
|
||||
}
|
||||
if (xp->xp_context == EXPAND_CHECKHEALTH) {
|
||||
char *directories[] = { "autoload/health", NULL };
|
||||
return ExpandRTDir(pat, 0, num_file, file, directories);
|
||||
}
|
||||
if (xp->xp_context == EXPAND_USER_LIST) {
|
||||
return ExpandUserList(xp, num_file, file);
|
||||
}
|
||||
|
Reference in New Issue
Block a user