diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-02-02 21:10:01 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-02-02 21:10:01 +0100 |
commit | d5e8c92816f35ea1a9298084238a08f35958baa6 (patch) | |
tree | 8d6777071a59e4433b2f01f1cbf10ad426c405bf /src/option.c | |
parent | e7bebc495d4014d7bc81f863939c35268cb8e97d (diff) |
patch 8.2.2452: no completion for the 'filetype' optionv8.2.2452
Problem: No completion for the 'filetype' option.
Solution: Add filetype completion. (Martin Tournoij, closes #7747)
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index b4893a10ad..bba467e5e9 100644 --- a/src/option.c +++ b/src/option.c @@ -2419,6 +2419,8 @@ was_set_insecurely(char_u *opt, int opt_flags) /* * Get a pointer to the flags used for the P_INSECURE flag of option * "opt_idx". For some local options a local flags field is used. + * NOTE: Caller must make sure that "curwin" is set to the window from which + * the option is used. */ static long_u * insecure_flag(int opt_idx, int opt_flags) @@ -6209,6 +6211,10 @@ set_context_in_set_cmd( else xp->xp_backslash = XP_BS_ONE; } + else if (p == (char_u *)&p_ft) + { + xp->xp_context = EXPAND_FILETYPE; + } else { xp->xp_context = EXPAND_FILES; |