diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-08-07 19:12:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-08-07 19:12:41 +0200 |
commit | 994b89d28dc54c896e00eba66e247addb0540272 (patch) | |
tree | 8138e955bd32a204c8ed74318350c440208ef253 | |
parent | de6804d871def4d8973ef3ca3eece4155a5c3ab1 (diff) | |
download | vim-git-994b89d28dc54c896e00eba66e247addb0540272.tar.gz |
patch 8.2.1386: backslash not removed afer space with space in 'isfname'v8.2.1386
Problem: Backslash not removed afer space in option with space in
'isfname'.
Solution: Do remove backslash before space, also when it is in 'isfname'.
(Yasuhiro Matsumoto, closes #6651)
-rw-r--r-- | src/option.c | 7 | ||||
-rw-r--r-- | src/testdir/test_options.vim | 9 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 15 insertions, 3 deletions
diff --git a/src/option.c b/src/option.c index f66fad947..648f22db3 100644 --- a/src/option.c +++ b/src/option.c @@ -1311,12 +1311,12 @@ do_set( { if (flags & (P_SECURE | P_NO_ML)) { - errmsg = _("E520: Not allowed in a modeline"); + errmsg = N_("E520: Not allowed in a modeline"); goto skip; } if ((flags & P_MLE) && !p_mle) { - errmsg = _("E992: Not allowed in a modeline when 'modelineexpr' is off"); + errmsg = N_("E992: Not allowed in a modeline when 'modelineexpr' is off"); goto skip; } #ifdef FEAT_DIFF @@ -1338,7 +1338,7 @@ do_set( // Disallow changing some options in the sandbox if (sandbox != 0 && (flags & P_SECURE)) { - errmsg = _(e_sandbox); + errmsg = e_sandbox; goto skip; } #endif @@ -1763,6 +1763,7 @@ do_set( #ifdef BACKSLASH_IN_FILENAME && !((flags & P_EXPAND) && vim_isfilec(arg[1]) + && !VIM_ISWHITE(arg[1]) && (arg[1] != '\\' || (s == newval && arg[2] != '\\'))) diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index 8f27d9c4a..b3e9da78f 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -973,4 +973,13 @@ func Test_opt_winminwidth() set winwidth& 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 diff --git a/src/version.c b/src/version.c index ea89d2df8..e251ba865 100644 --- a/src/version.c +++ b/src/version.c @@ -755,6 +755,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1386, +/**/ 1385, /**/ 1384, |