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 #12015)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 7f6cbac..cf30ed7 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -9940,7 +9940,7 @@
if (!curwin->w_p_spell)
{
- did_set_spelllang(curwin);
+ parse_spelllang(curwin);
curwin->w_p_spell = TRUE;
}
@@ -10030,7 +10030,7 @@
if (!curwin->w_p_spell)
{
- did_set_spelllang(curwin);
+ parse_spelllang(curwin);
curwin->w_p_spell = TRUE;
}