]> granicus.if.org Git - vim/commitdiff
patch 8.2.1926: cannot use a space in 'spellfile' v8.2.1926
authorBram Moolenaar <Bram@vim.org>
Fri, 30 Oct 2020 18:25:09 +0000 (19:25 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 30 Oct 2020 18:25:09 +0000 (19:25 +0100)
Problem:    Cannot use a space in 'spellfile'. (Filipe Brandenburger)
Solution:   Permit using a space. (closes #7230)

src/spell.c
src/testdir/gen_opt_test.vim
src/version.c

index 085f3177cb7aff78aeb6ff6393a636d2c3f33b8a..b474a38b3c2e2f0093125314bb0246152e99d052 100644 (file)
@@ -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;
 }
index 600a7908068184eff809eb66bd81dc240a83de4c..abf11fc9dced85996c554fbf2cbb15fe5db6c925 100644 (file)
@@ -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']],
index abdebda361b1e316e3cd63c3048de2e1c2eca788..96a9430fb3096039348c5f7da2aed94abe263794 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1926,
 /**/
     1925,
 /**/