aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/option.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-03-13 08:27:37 -0500
committerGitHub <noreply@github.com>2021-03-13 08:27:37 -0500
commit5d5e018a5c1a8f0f185718dd4513b908c164a6b9 (patch)
treec65c1e34c4ea4a51c9467797858e7fad6ac34e0f /src/nvim/option.c
parentd38508d88ab78415368bce350072f9f0f73c15d2 (diff)
parenta4ea6027880211b15b5659054e6e14d384517e27 (diff)
downloadrneovim-5d5e018a5c1a8f0f185718dd4513b908c164a6b9.tar.gz
rneovim-5d5e018a5c1a8f0f185718dd4513b908c164a6b9.tar.bz2
rneovim-5d5e018a5c1a8f0f185718dd4513b908c164a6b9.zip
Merge pull request #14125 from janlazo/vim-8.2.2591
vim-patch:8.2.{2341,2452,2591}
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r--src/nvim/option.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c
index ac25c86b5f..dbd8ceb55c 100644
--- a/src/nvim/option.c
+++ b/src/nvim/option.c
@@ -2086,9 +2086,12 @@ int was_set_insecurely(win_T *const wp, 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 "wp" is set to the window from which
+/// the option is used.
static uint32_t *insecure_flag(win_T *const wp, int opt_idx, int opt_flags)
{
- if (opt_flags & OPT_LOCAL)
+ if (opt_flags & OPT_LOCAL) {
+ assert(wp != NULL);
switch ((int)options[opt_idx].indir) {
case PV_STL: return &wp->w_p_stl_flags;
case PV_FDE: return &wp->w_p_fde_flags;
@@ -2097,6 +2100,7 @@ static uint32_t *insecure_flag(win_T *const wp, int opt_idx, int opt_flags)
case PV_FEX: return &wp->w_buffer->b_p_fex_flags;
case PV_INEX: return &wp->w_buffer->b_p_inex_flags;
}
+ }
// Nothing special, return global flags field.
return &options[opt_idx].flags;
@@ -6178,6 +6182,8 @@ set_context_in_set_cmd(
xp->xp_backslash = XP_BS_THREE;
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;
// for 'tags' need three backslashes for a space