diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/option.c | 7 | ||||
-rw-r--r-- | src/nvim/testdir/test_options.vim | 10 |
2 files changed, 14 insertions, 3 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 168160834b..a70a634966 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -1355,11 +1355,11 @@ int do_set( // Disallow changing some options from modelines. if (opt_flags & OPT_MODELINE) { if (flags & (P_SECURE | P_NO_ML)) { - errmsg = (char_u *)_("E520: Not allowed in a modeline"); + errmsg = (char_u *)N_("E520: Not allowed in a modeline"); goto skip; } if ((flags & P_MLE) && !p_mle) { - errmsg = (char_u *)_( + errmsg = (char_u *)N_( "E992: Not allowed in a modeline when 'modelineexpr' is off"); goto skip; } @@ -1376,7 +1376,7 @@ int do_set( // Disallow changing some options in the sandbox if (sandbox != 0 && (flags & P_SECURE)) { - errmsg = (char_u *)_(e_sandbox); + errmsg = e_sandbox; goto skip; } @@ -1712,6 +1712,7 @@ int do_set( #ifdef BACKSLASH_IN_FILENAME && !((flags & P_EXPAND) && vim_isfilec(arg[1]) + && !ascii_iswhite(arg[1]) && (arg[1] != '\\' || (s == newval && arg[2] != '\\'))) diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 04a5c62f66..9e8da74db7 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -576,3 +576,13 @@ func Test_opt_boolean() set number& endfunc +" Test for setting option value containing spaces with isfname+=32 +func Test_isfname_with_options() + set isfname+=32 + setlocal keywordprg=:term\ help.exe + call assert_equal(':term help.exe', &keywordprg) + set isfname& + setlocal keywordprg& +endfunc + +" vim: shiftwidth=2 sts=2 expandtab |