After this option has been set successfully, Vim will source the files
"spell/LANG.vim" in 'runtimepath'. "LANG" is the value of 'spelllang'
- up to the first comma, dot or underscore.
+ up to the first character that is not an ASCII letter and not a dash.
Also see |set-spc-auto|.
current_sctx.sc_lnum = 0;
#endif
// Make sure no risky things are executed as a side effect.
- ++sandbox;
+ ++secure;
retval = do_set(s, OPT_MODELINE | OPT_LOCAL | flags);
- --sandbox;
+ --secure;
#ifdef FEAT_EVAL
current_sctx = save_current_sctx;
#endif
* '.encoding'.
*/
for (p = q; *p != NUL; ++p)
- if (vim_strchr((char_u *)"_.,", *p) != NULL)
+ if (!ASCII_ISALPHA(*p) && *p != '-')
break;
- vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
- source_runtime(fname, DIP_ALL);
+ if (p > q)
+ {
+ vim_snprintf((char *)fname, 200, "spell/%.*s.vim", (int)(p - q), q);
+ source_runtime(fname, DIP_ALL);
+ }
}
#endif
}