This commit is contained in:
Jan Edmund Lazo
2018-09-03 00:50:54 -04:00
parent d29b71a1de
commit f3c895569d

View File

@@ -4683,30 +4683,36 @@ int find_help_tags(const char_u *arg, int *num_matches, char_u ***matches,
bool keep_lang) bool keep_lang)
{ {
int i; int i;
static char *(mtable[]) = {"*", "g*", "[*", "]*", static const char *(mtable[]) = {
"/*", "/\\*", "\"*", "**", "*", "g*", "[*", "]*",
"/\\(\\)", "/\\%(\\)", "/*", "/\\*", "\"*", "**",
"?", ":?", "?<CR>", "g?", "g?g?", "g??", "/\\(\\)", "/\\%(\\)",
"-?", "q?", "v_g?", "?", ":?", "?<CR>", "g?", "g?g?", "g??",
"/\\?", "/\\z(\\)", "\\=", ":s\\=", "-?", "q?", "v_g?",
"[count]", "[quotex]", "/\\?", "/\\z(\\)", "\\=", ":s\\=",
"[range]", ":[range]", "[count]", "[quotex]",
"[pattern]", "\\|", "\\%$", "[range]", ":[range]",
"s/\\~", "s/\\U", "s/\\L", "[pattern]", "\\|", "\\%$",
"s/\\1", "s/\\2", "s/\\3", "s/\\9"}; "s/\\~", "s/\\U", "s/\\L",
static char *(rtable[]) = {"star", "gstar", "[star", "]star", "s/\\1", "s/\\2", "s/\\3", "s/\\9"
"/star", "/\\\\star", "quotestar", "starstar", };
"/\\\\(\\\\)", "/\\\\%(\\\\)", static const char *(rtable[]) = {
"?", ":?", "?<CR>", "g?", "g?g?", "g??", "star", "gstar", "[star", "]star",
"-?", "q?", "v_g?", "/star", "/\\\\star", "quotestar", "starstar",
"/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=", "/\\\\(\\\\)", "/\\\\%(\\\\)",
"\\[count]", "\\[quotex]", "?", ":?", "?<CR>", "g?", "g?g?", "g??",
"\\[range]", ":\\[range]", "-?", "q?", "v_g?",
"\\[pattern]", "\\\\bar", "/\\\\%\\$", "/\\\\?", "/\\\\z(\\\\)", "\\\\=", ":s\\\\=",
"s/\\\\\\~", "s/\\\\U", "s/\\\\L", "\\[count]", "\\[quotex]",
"s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"}; "\\[range]", ":\\[range]",
static char *(expr_table[]) = {"!=?", "!~?", "<=?", "<?", "==?", "=~?", "\\[pattern]", "\\\\bar", "/\\\\%\\$",
">=?", ">?", "is?", "isnot?"}; "s/\\\\\\~", "s/\\\\U", "s/\\\\L",
"s/\\\\1", "s/\\\\2", "s/\\\\3", "s/\\\\9"
};
static const char *(expr_table[]) = {
"!=?", "!~?", "<=?", "<?", "==?", "=~?",
">=?", ">?", "is?", "isnot?"
};
char_u *d = IObuff; // assume IObuff is long enough! char_u *d = IObuff; // assume IObuff is long enough!
if (STRNICMP(arg, "expr-", 5) == 0) { if (STRNICMP(arg, "expr-", 5) == 0) {
@@ -4870,8 +4876,9 @@ int find_help_tags(const char_u *arg, int *num_matches, char_u ***matches,
*matches = (char_u **)""; *matches = (char_u **)"";
*num_matches = 0; *num_matches = 0;
int flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE; int flags = TAG_HELP | TAG_REGEXP | TAG_NAMES | TAG_VERBOSE;
if (keep_lang) if (keep_lang) {
flags |= TAG_KEEP_LANG; flags |= TAG_KEEP_LANG;
}
if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK if (find_tags(IObuff, num_matches, matches, flags, (int)MAXCOL, NULL) == OK
&& *num_matches > 0) { && *num_matches > 0) {
/* Sort the matches found on the heuristic number that is after the /* Sort the matches found on the heuristic number that is after the