updated for version 7.0074
diff --git a/src/screen.c b/src/screen.c
index 58fb4d0..0139788 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -4818,6 +4818,7 @@
#ifdef FEAT_WILDMENU
static int status_match_len __ARGS((expand_T *xp, char_u *s));
+static int skip_status_match_char __ARGS((expand_T *xp, char_u *s));
/*
* Get the lenght of an item as it will be shown in the status line.
@@ -4840,12 +4841,7 @@
while (*s != NUL)
{
- /* Don't display backslashes used for escaping, they look ugly. */
- if (rem_backslash(s)
-#ifdef FEAT_MENU
- || (emenu && (s[0] == '\\' && s[1] != NUL))
-#endif
- )
+ if (skip_status_match_char(xp, s))
++s;
len += ptr2cells(s);
mb_ptr_adv(s);
@@ -4855,6 +4851,24 @@
}
/*
+ * Return TRUE for characters that are not displayed in a status match.
+ * These are backslashes used for escaping. Do show backslashes in help tags.
+ */
+ static int
+skip_status_match_char(xp, s)
+ expand_T *xp;
+ char_u *s;
+{
+ return ((rem_backslash(s) && xp->xp_context != EXPAND_HELP)
+#ifdef FEAT_MENU
+ || ((xp->xp_context == EXPAND_MENUS
+ || xp->xp_context == EXPAND_MENUNAMES)
+ && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
+#endif
+ );
+}
+
+/*
* Show wildchar matches in the status line.
* Show at least the "match" item.
* We start at item 'first_match' in the list and show all matches that fit.
@@ -4989,13 +5003,7 @@
#endif
for ( ; *s != NUL; ++s)
{
- /* Don't display backslashes used for escaping, they look ugly. */
- if (rem_backslash(s)
-#ifdef FEAT_MENU
- || (emenu
- && (s[0] == '\t' || (s[0] == '\\' && s[1] != NUL)))
-#endif
- )
+ if (skip_status_match_char(xp, s))
++s;
clen += ptr2cells(s);
#ifdef FEAT_MBYTE