Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
20801:f69512e0cedc | 20802:ed00f0fbdaef |
---|---|
246 #endif | 246 #endif |
247 #ifdef FEAT_SPELL | 247 #ifdef FEAT_SPELL |
248 check_string_option(&buf->b_s.b_p_spc); | 248 check_string_option(&buf->b_s.b_p_spc); |
249 check_string_option(&buf->b_s.b_p_spf); | 249 check_string_option(&buf->b_s.b_p_spf); |
250 check_string_option(&buf->b_s.b_p_spl); | 250 check_string_option(&buf->b_s.b_p_spl); |
251 check_string_option(&buf->b_s.b_p_spo); | |
251 #endif | 252 #endif |
252 #ifdef FEAT_SEARCHPATH | 253 #ifdef FEAT_SEARCHPATH |
253 check_string_option(&buf->b_p_sua); | 254 check_string_option(&buf->b_p_sua); |
254 #endif | 255 #endif |
255 #ifdef FEAT_CINDENT | 256 #ifdef FEAT_CINDENT |
1712 // When 'spellcapcheck' is set compile the regexp program. | 1713 // When 'spellcapcheck' is set compile the regexp program. |
1713 else if (varp == &(curwin->w_s->b_p_spc)) | 1714 else if (varp == &(curwin->w_s->b_p_spc)) |
1714 { | 1715 { |
1715 errmsg = compile_cap_prog(curwin->w_s); | 1716 errmsg = compile_cap_prog(curwin->w_s); |
1716 } | 1717 } |
1718 // 'spelloptions' | |
1719 else if (varp == &(curwin->w_s->b_p_spo)) | |
1720 { | |
1721 if (**varp != NUL && STRCMP("camel", *varp) != 0) | |
1722 errmsg = e_invarg; | |
1723 } | |
1717 // 'spellsuggest' | 1724 // 'spellsuggest' |
1718 else if (varp == &p_sps) | 1725 else if (varp == &p_sps) |
1719 { | 1726 { |
1720 if (spell_check_sps() != OK) | 1727 if (spell_check_sps() != OK) |
1721 errmsg = e_invarg; | 1728 errmsg = e_invarg; |