diff options
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 1598d893e..b9ec6c530 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3861,13 +3861,24 @@ set_one_cmd_context(xp, buff) #if (defined(HAVE_LOCALE_H) || defined(X_LOCALE)) \ && (defined(FEAT_GETTEXT) || defined(FEAT_MBYTE)) case CMD_language: - if (*skiptowhite(arg) == NUL) + p = skiptowhite(arg); + if (*p == NUL) { xp->xp_context = EXPAND_LANGUAGE; xp->xp_pattern = arg; } else - xp->xp_context = EXPAND_NOTHING; + { + if ( STRNCMP(arg, "messages", p - arg) == 0 + || STRNCMP(arg, "ctype", p - arg) == 0 + || STRNCMP(arg, "time", p - arg) == 0) + { + xp->xp_context = EXPAND_LOCALES; + xp->xp_pattern = skipwhite(p); + } + else + xp->xp_context = EXPAND_NOTHING; + } break; #endif #if defined(FEAT_PROFILE) |