aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/spell.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2023-04-17 17:23:47 +0100
committerzeertzjq <zeertzjq@outlook.com>2023-04-28 23:04:09 +0800
commitff34c91194f9ab9d02808f2880029c38a4655eb5 (patch)
treefc0eb2a8e58b92e6af59411165a0127af63dd552 /src/nvim/spell.c
parent715587f8e44e941ece6f17eb77620fd1b4719496 (diff)
downloadrneovim-ff34c91194f9ab9d02808f2880029c38a4655eb5.tar.gz
rneovim-ff34c91194f9ab9d02808f2880029c38a4655eb5.tar.bz2
rneovim-ff34c91194f9ab9d02808f2880029c38a4655eb5.zip
vim-patch:9.0.1330: handling new value of an option has a long "else if" chain
Problem: Handling new value of an option has a long "else if" chain. Solution: Use a function pointer. (Yegappan Lakshmanan, closes vim/vim#12015) https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
Diffstat (limited to 'src/nvim/spell.c')
-rw-r--r--src/nvim/spell.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/spell.c b/src/nvim/spell.c
index a571131ba1..0784c4c8ff 100644
--- a/src/nvim/spell.c
+++ b/src/nvim/spell.c
@@ -1851,7 +1851,7 @@ static int count_syllables(slang_T *slang, const char *word)
/// Parse 'spelllang' and set w_s->b_langp accordingly.
/// @return NULL if it's OK, an untranslated error message otherwise.
-char *did_set_spelllang(win_T *wp)
+char *parse_spelllang(win_T *wp)
{
garray_T ga;
char *splp;
@@ -2309,7 +2309,7 @@ void spell_reload(void)
// window for this buffer in which 'spell' is set.
if (*wp->w_s->b_p_spl != NUL) {
if (wp->w_p_spell) {
- (void)did_set_spelllang(wp);
+ (void)parse_spelllang(wp);
break;
}
}
@@ -3637,7 +3637,7 @@ const char *did_set_spell_option(bool is_spellfile)
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
if (wp->w_buffer == curbuf && wp->w_p_spell) {
- errmsg = did_set_spelllang(wp);
+ errmsg = parse_spelllang(wp);
break;
}
}