@@ -6583,7 +6583,8 @@ find_help_tags(
65836583 static char * (mtable []) = {"*" , "g*" , "[*" , "]*" , ":*" ,
65846584 "/*" , "/\\*" , "\"*" , "**" ,
65856585 "cpo-*" , "/\\(\\)" , "/\\%(\\)" ,
6586- "?" , ":?" , "-?" , "?<CR>" , "g?" , "g?g?" , "g??" ,
6586+ "?" , ":?" , "?<CR>" , "g?" , "g?g?" , "g??" ,
6587+ "-?" , "q?" , "v_g?" ,
65876588 "/\\?" , "/\\z(\\)" , "\\=" , ":s\\=" ,
65886589 "[count]" , "[quotex]" ,
65896590 "[range]" , ":[range]" ,
@@ -6593,27 +6594,43 @@ find_help_tags(
65936594 static char * (rtable []) = {"star" , "gstar" , "[star" , "]star" , ":star" ,
65946595 "/star" , "/\\\\star" , "quotestar" , "starstar" ,
65956596 "cpo-star" , "/\\\\(\\\\)" , "/\\\\%(\\\\)" ,
6596- "?" , ":?" , "-?" , "?<CR>" , "g?" , "g?g?" , "g??" ,
6597+ "?" , ":?" , "?<CR>" , "g?" , "g?g?" , "g??" ,
6598+ "-?" , "q?" , "v_g?" ,
65976599 "/\\\\?" , "/\\\\z(\\\\)" , "\\\\=" , ":s\\\\=" ,
65986600 "\\[count]" , "\\[quotex]" ,
65996601 "\\[range]" , ":\\[range]" ,
66006602 "\\[pattern]" , "\\\\bar" , "/\\\\%\\$" ,
66016603 "s/\\\\\\~" , "s/\\\\U" , "s/\\\\L" ,
66026604 "s/\\\\1" , "s/\\\\2" , "s/\\\\3" , "s/\\\\9" };
6605+ static char * (expr_table []) = {"!=?" , "!~?" , "<=?" , "<?" , "==?" , "=~?" ,
6606+ ">=?" , ">?" , "is?" , "isnot?" };
66036607 int flags ;
66046608
66056609 d = IObuff ; /* assume IObuff is long enough! */
66066610
6607- /*
6608- * Recognize a few exceptions to the rule. Some strings that contain '*'
6609- * with "star". Otherwise '*' is recognized as a wildcard.
6610- */
6611- for (i = (int )(sizeof (mtable ) / sizeof (char * )); -- i >= 0 ; )
6612- if (STRCMP (arg , mtable [i ]) == 0 )
6613- {
6614- STRCPY (d , rtable [i ]);
6615- break ;
6616- }
6611+ if (STRNICMP (arg , "expr-" , 5 ) == 0 )
6612+ {
6613+ // When the string starting with "expr-" and containing '?' and matches
6614+ // the table, it is taken literally. Otherwise '?' is recognized as a
6615+ // wildcard.
6616+ for (i = (int )(sizeof (expr_table ) / sizeof (char * )); -- i >= 0 ; )
6617+ if (STRCMP (arg + 5 , expr_table [i ]) == 0 )
6618+ {
6619+ STRCPY (d , arg );
6620+ break ;
6621+ }
6622+ }
6623+ else
6624+ {
6625+ // Recognize a few exceptions to the rule. Some strings that contain
6626+ // '*' with "star". Otherwise '*' is recognized as a wildcard.
6627+ for (i = (int )(sizeof (mtable ) / sizeof (char * )); -- i >= 0 ; )
6628+ if (STRCMP (arg , mtable [i ]) == 0 )
6629+ {
6630+ STRCPY (d , rtable [i ]);
6631+ break ;
6632+ }
6633+ }
66176634
66186635 if (i < 0 ) /* no match in table */
66196636 {
0 commit comments