diff options
author | Bram Moolenaar <Bram@vim.org> | 2010-06-21 06:24:34 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2010-06-21 06:24:34 +0200 |
commit | 883f5d08e48e0e8b6d7bcade0cc48a36fc41931e (patch) | |
tree | 84d6f3846624c3b5c7160f7c80af5885388b4ca8 /src/ex_getln.c | |
parent | a8ffcbbf5d6070380e41b3d0841c3944396a27c0 (diff) |
Command line completion for :ownsyntax. (Dominique Pelle)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index e8b6f7c4d1..e6ed44a41e 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -4108,6 +4108,7 @@ addstar(fname, len, context) if (context == EXPAND_HELP || context == EXPAND_COLORS || context == EXPAND_COMPILER + || context == EXPAND_FILETYPE || (context == EXPAND_TAGS && fname[0] == '/')) retval = vim_strnsave(fname, len); else @@ -4489,6 +4490,8 @@ ExpandFromContext(xp, pat, num_file, file, options) return ExpandRTDir(pat, num_file, file, "colors"); if (xp->xp_context == EXPAND_COMPILER) return ExpandRTDir(pat, num_file, file, "compiler"); + if (xp->xp_context == EXPAND_FILETYPE) + return ExpandRTDir(pat, num_file, file, "syntax"); # if defined(FEAT_USR_CMDS) && defined(FEAT_EVAL) if (xp->xp_context == EXPAND_USER_LIST) return ExpandUserList(xp, num_file, file); @@ -4928,15 +4931,15 @@ ExpandUserList(xp, num_file, file) #endif /* - * Expand color scheme names: 'runtimepath'/colors/{pat}.vim - * or compiler names. + * Expand color scheme, compiler or filetype names: + * 'runtimepath'/{dirname}/{pat}.vim */ static int ExpandRTDir(pat, num_file, file, dirname) char_u *pat; int *num_file; char_u ***file; - char *dirname; /* "colors" or "compiler" */ + char *dirname; /* "colors", "compiler" or "syntax" */ { char_u *all; char_u *s; |