Mercurial > vim
diff src/spell.c @ 31996:ca6bc7c04163 v9.0.1330
patch 9.0.1330: handling new value of an option has a long "else if" chain
Commit: https://github.com/vim/vim/commit/af93691b53f38784efce0b93fe7644c44a7e382e
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Mon Feb 20 12:16:39 2023 +0000
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 https://github.com/vim/vim/issues/12015)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 20 Feb 2023 13:30:05 +0100 |
parents | 9f28cca2410a |
children | 0632606a2530 |
line wrap: on
line diff
--- a/src/spell.c +++ b/src/spell.c @@ -1987,7 +1987,7 @@ count_syllables(slang_T *slang, char_u * * Returns NULL if it's OK, an untranslated error message otherwise. */ char * -did_set_spelllang(win_T *wp) +parse_spelllang(win_T *wp) { garray_T ga; char_u *splp; @@ -2503,7 +2503,7 @@ spell_reload(void) { if (wp->w_p_spell) { - (void)did_set_spelllang(wp); + (void)parse_spelllang(wp); break; } } @@ -4410,7 +4410,7 @@ did_set_spell_option(int is_spellfile) FOR_ALL_WINDOWS(wp) if (wp->w_buffer == curbuf && wp->w_p_spell) { - errmsg = did_set_spelllang(wp); + errmsg = parse_spelllang(wp); break; } return errmsg;