Mercurial > vim
diff src/testdir/test_spell.vim @ 10950:2297aae8e127 v8.0.0364
patch 8.0.0364: ]s does not move cursor with two spell errors in one line
commit https://github.com/vim/vim/commit/d3f78dc9ebd729475a7f24a50a91112e300d5ac9
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Feb 25 14:21:10 2017 +0100
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.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 25 Feb 2017 14:30:04 +0100 |
parents | |
children | a2124e9bbb6a |
line wrap: on
line diff
new file mode 100644 --- /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