forked from aniani/vim
Problem: ]s does not move cursor with two spell errors in one line. (Manuel
Ortega)
Solution: Don't stop search immediately when wrapped, search the line first.
(Ken Takata) Add a test.
21 lines
437 B
VimL
21 lines
437 B
VimL
" Test spell checking
|
|
" TODO: move test58 tests here
|
|
|
|
if !has('spell')
|
|
finish
|
|
endif
|
|
|
|
func Test_wrap_search()
|
|
new
|
|
call setline(1, ['The', '', 'A plong line with two zpelling mistakes', '', 'End'])
|
|
set spell wrapscan
|
|
normal ]s
|
|
call assert_equal('plong', expand('<cword>'))
|
|
normal ]s
|
|
call assert_equal('zpelling', expand('<cword>'))
|
|
normal ]s
|
|
call assert_equal('plong', expand('<cword>'))
|
|
bwipe!
|
|
set nospell
|
|
endfunc
|