mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
vim-patch:8.2.0932: missspelling spelllang
Problem: Missspelling spelllang.
Solution: Add an "l". (Dominique Pelle)
f154f3ab2c
This commit is contained in:
@@ -2545,8 +2545,8 @@ static bool valid_filetype(const char_u *val)
|
|||||||
return valid_name(val, ".-_");
|
return valid_name(val, ".-_");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Return true if "val" is a valid 'spellang' value.
|
/// Return true if "val" is a valid 'spelllang' value.
|
||||||
bool valid_spellang(const char_u *val)
|
bool valid_spelllang(const char_u *val)
|
||||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||||
{
|
{
|
||||||
return valid_name(val, ".-_,@");
|
return valid_name(val, ".-_,@");
|
||||||
@@ -3078,7 +3078,7 @@ ambw_end:
|
|||||||
const bool is_spellfile = varp == &(curwin->w_s->b_p_spf);
|
const bool is_spellfile = varp == &(curwin->w_s->b_p_spf);
|
||||||
|
|
||||||
if ((is_spellfile && !valid_spellfile(*varp))
|
if ((is_spellfile && !valid_spellfile(*varp))
|
||||||
|| (!is_spellfile && !valid_spellang(*varp))) {
|
|| (!is_spellfile && !valid_spelllang(*varp))) {
|
||||||
errmsg = e_invarg;
|
errmsg = e_invarg;
|
||||||
} else {
|
} else {
|
||||||
errmsg = did_set_spell_option(is_spellfile);
|
errmsg = did_set_spell_option(is_spellfile);
|
||||||
|
@@ -2007,7 +2007,7 @@ char_u *did_set_spelllang(win_T *wp)
|
|||||||
region = NULL;
|
region = NULL;
|
||||||
len = (int)STRLEN(lang);
|
len = (int)STRLEN(lang);
|
||||||
|
|
||||||
if (!valid_spellang(lang)) {
|
if (!valid_spelllang(lang)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user