diff src/optionstr.c @ 20802:ed00f0fbdaef v8.2.0953

patch 8.2.0953: spell checking doesn't work for CamelCased words Commit: https://github.com/vim/vim/commit/362b44bd4aa87a2aef0f8fd5a28d68dd09a7d909 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Jun 10 21:47:00 2020 +0200 patch 8.2.0953: spell checking doesn't work for CamelCased words Problem: Spell checking doesn't work for CamelCased words. Solution: Add the "camel" value in the new option 'spelloptions'. (closes #1235)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 Jun 2020 22:00:04 +0200
parents 813b9a7064a4
children 3d73cdd173ab
line wrap: on
line diff
--- a/src/optionstr.c
+++ b/src/optionstr.c
@@ -248,6 +248,7 @@ check_buf_options(buf_T *buf)
     check_string_option(&buf->b_s.b_p_spc);
     check_string_option(&buf->b_s.b_p_spf);
     check_string_option(&buf->b_s.b_p_spl);
+    check_string_option(&buf->b_s.b_p_spo);
 #endif
 #ifdef FEAT_SEARCHPATH
     check_string_option(&buf->b_p_sua);
@@ -1714,6 +1715,12 @@ did_set_string_option(
     {
 	errmsg = compile_cap_prog(curwin->w_s);
     }
+    // 'spelloptions'
+    else if (varp == &(curwin->w_s->b_p_spo))
+    {
+	if (**varp != NUL && STRCMP("camel", *varp) != 0)
+	    errmsg = e_invarg;
+    }
     // 'spellsuggest'
     else if (varp == &p_sps)
     {