changeset 22756:87accad5a407 v8.2.1926

patch 8.2.1926: cannot use a space in 'spellfile' Commit: https://github.com/vim/vim/commit/b2620202c7778d8c709941fb430eeeeab6e63a6a Author: Bram Moolenaar <Bram@vim.org> Date: Fri Oct 30 19:25:09 2020 +0100 patch 8.2.1926: cannot use a space in 'spellfile' Problem: Cannot use a space in 'spellfile'. (Filipe Brandenburger) Solution: Permit using a space. (closes https://github.com/vim/vim/issues/7230)
author Bram Moolenaar <Bram@vim.org>
date Fri, 30 Oct 2020 19:30:03 +0100
parents 35d579f90a5c
children eef3cb7bc773
files src/spell.c src/testdir/gen_opt_test.vim src/version.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/spell.c
+++ b/src/spell.c
@@ -4340,7 +4340,7 @@ valid_spellfile(char_u *val)
     char_u *s;
 
     for (s = val; *s != NUL; ++s)
-	if (!vim_isfilec(*s) && *s != ',')
+	if (!vim_isfilec(*s) && *s != ',' && *s != ' ')
 	    return FALSE;
     return TRUE;
 }
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -130,7 +130,7 @@ let test_values = {
       \ 'selectmode': [['', 'mouse', 'key,cmd'], ['xxx']],
       \ 'sessionoptions': [['', 'blank', 'help,options,slash'], ['xxx']],
       \ 'signcolumn': [['', 'auto', 'no'], ['xxx', 'no,yes']],
-      \ 'spellfile': [['', 'file.en.add'], ['xxx', '/tmp/file']],
+      \ 'spellfile': [['', 'file.en.add', '/tmp/dir\ with\ space/en.utf-8.add'], ['xxx', '/tmp/file']],
       \ 'spelllang': [['', 'xxx', 'sr@latin'], ['not&lang', "that\\\rthere"]],
       \ 'spelloptions': [['', 'camel'], ['xxx']],
       \ 'spellsuggest': [['', 'best', 'double,33'], ['xxx']],
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1926,
+/**/
     1925,
 /**/
     1924,