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:
@@ -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']],
|
||||
|
@@ -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'))
|
||||
|
Reference in New Issue
Block a user