0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

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)
This commit is contained in:
Bram Moolenaar
2020-06-10 21:47:00 +02:00
parent be5ee8686a
commit 362b44bd4a
10 changed files with 45 additions and 0 deletions

View File

@@ -132,6 +132,7 @@ let test_values = {
\ 'signcolumn': [['', 'auto', 'no'], ['xxx', 'no,yes']],
\ 'spellfile': [['', 'file.en.add'], ['xxx', '/tmp/file']],
\ 'spelllang': [['', 'xxx', 'sr@latin'], ['not&lang', "that\\\rthere"]],
\ 'spelloptions': [['', 'camel'], ['xxx']],
\ 'spellsuggest': [['', 'best', 'double,33'], ['xxx']],
\ 'switchbuf': [['', 'useopen', 'split,newtab'], ['xxx']],
\ 'tagcase': [['smart', 'match'], ['', 'xxx', 'smart,match']],

View File

@@ -77,6 +77,11 @@ func Test_spellbadword()
call assert_equal(['bycycle', 'bad'], spellbadword('My bycycle.'))
call assert_equal(['another', 'caps'], 'A sentence. another sentence'->spellbadword())
call assert_equal(['TheCamelWord', 'bad'], 'TheCamelWord asdf'->spellbadword())
set spelloptions=camel
call assert_equal(['asdf', 'bad'], 'TheCamelWord asdf'->spellbadword())
set spelloptions=
set spelllang=en
call assert_equal(['', ''], spellbadword('centre'))
call assert_equal(['', ''], spellbadword('center'))