diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-05-14 15:28:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-05-14 15:28:44 +0200 |
commit | e6850798483afb3a54adf26bdd25c625d70e98d8 (patch) | |
tree | b2201709326f0c8f584dd8f463dbaf52f627ce6d /src/ex_docmd.c | |
parent | 9577c3e9734ecc2d39dc900d55be3c6ae14b57b1 (diff) | |
download | vim-git-e6850798483afb3a54adf26bdd25c625d70e98d8.tar.gz |
updated for version 7.2.424v7.2.424
Problem: ":colorscheme" without an argument doesn't do anything.
Solution: Make it echo the current color scheme name. (partly by Christian
Brabandt)
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r-- | src/ex_docmd.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index f8795fa16..dbb058444 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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); } |