1
0
forked from aniani/vim

updated for version 7.2.424

Problem:    ":colorscheme" without an argument doesn't do anything.
Solution:   Make it echo the current color scheme name.  (partly by Christian
            Brabandt)
This commit is contained in:
Bram Moolenaar
2010-05-14 15:28:44 +02:00
parent 9577c3e973
commit e685079848
3 changed files with 28 additions and 2 deletions

View File

@@ -6226,7 +6226,31 @@ parse_compl_arg(value, vallen, complp, argt, compl_arg)
ex_colorscheme(eap)
exarg_T *eap;
{
if (load_colors(eap->arg) == FAIL)
if (*eap->arg == NUL)
{
#ifdef FEAT_EVAL
char_u *expr = vim_strsave((char_u *)"g:colors_name");
char_u *p = NULL;
if (expr != NULL)
{
++emsg_off;
p = eval_to_string(expr, NULL, FALSE);
--emsg_off;
vim_free(expr);
}
if (p != NULL)
{
MSG(p);
vim_free(p);
}
else
MSG("default");
#else
MSG(_("unknown"));
#endif
}
else if (load_colors(eap->arg) == FAIL)
EMSG2(_("E185: Cannot find color scheme %s"), eap->arg);
}