patch 8.0.0364: ]s does not move cursor with two spell errors in one line
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.
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
index 057e8b1..18dfdc8 100644
--- a/src/testdir/Make_all.mak
+++ b/src/testdir/Make_all.mak
@@ -192,6 +192,7 @@
test_search.res \
test_signs.res \
test_smartindent.res \
+ test_spell.res \
test_startup.res \
test_startup_utf8.res \
test_stat.res \
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
new file mode 100644
index 0000000..e6c3729
--- /dev/null
+++ b/src/testdir/test_spell.vim
@@ -0,0 +1,20 @@
+" 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