mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
vim-patch:8.2.1386: backslash not removed afer space with space in 'isfname'
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 vim/vim#6651)
994b89d28d
This commit is contained in:
@@ -1355,11 +1355,11 @@ int do_set(
|
|||||||
// Disallow changing some options from modelines.
|
// Disallow changing some options from modelines.
|
||||||
if (opt_flags & OPT_MODELINE) {
|
if (opt_flags & OPT_MODELINE) {
|
||||||
if (flags & (P_SECURE | P_NO_ML)) {
|
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;
|
goto skip;
|
||||||
}
|
}
|
||||||
if ((flags & P_MLE) && !p_mle) {
|
if ((flags & P_MLE) && !p_mle) {
|
||||||
errmsg = (char_u *)_(
|
errmsg = (char_u *)N_(
|
||||||
"E992: Not allowed in a modeline when 'modelineexpr' is off");
|
"E992: Not allowed in a modeline when 'modelineexpr' is off");
|
||||||
goto skip;
|
goto skip;
|
||||||
}
|
}
|
||||||
@@ -1376,7 +1376,7 @@ int do_set(
|
|||||||
|
|
||||||
// Disallow changing some options in the sandbox
|
// Disallow changing some options in the sandbox
|
||||||
if (sandbox != 0 && (flags & P_SECURE)) {
|
if (sandbox != 0 && (flags & P_SECURE)) {
|
||||||
errmsg = (char_u *)_(e_sandbox);
|
errmsg = e_sandbox;
|
||||||
goto skip;
|
goto skip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1712,6 +1712,7 @@ int do_set(
|
|||||||
#ifdef BACKSLASH_IN_FILENAME
|
#ifdef BACKSLASH_IN_FILENAME
|
||||||
&& !((flags & P_EXPAND)
|
&& !((flags & P_EXPAND)
|
||||||
&& vim_isfilec(arg[1])
|
&& vim_isfilec(arg[1])
|
||||||
|
&& !ascii_iswhite(arg[1])
|
||||||
&& (arg[1] != '\\'
|
&& (arg[1] != '\\'
|
||||||
|| (s == newval
|
|| (s == newval
|
||||||
&& arg[2] != '\\')))
|
&& arg[2] != '\\')))
|
||||||
|
@@ -576,3 +576,13 @@ func Test_opt_boolean()
|
|||||||
set number&
|
set number&
|
||||||
endfunc
|
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
|
||||||
|
Reference in New Issue
Block a user