diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-25 14:21:10 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-25 14:21:10 +0100 |
commit | d3f78dc9ebd729475a7f24a50a91112e300d5ac9 (patch) | |
tree | 00afd985ba5dd028f17ce94bd402e43070f6e5c0 /src/testdir/test_spell.vim | |
parent | 3834e3d039777e0144914a86289870bee147c0a2 (diff) | |
download | vim-git-d3f78dc9ebd729475a7f24a50a91112e300d5ac9.tar.gz |
patch 8.0.0364: ]s does not move cursor with two spell errors in one linev8.0.0364
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.
Diffstat (limited to 'src/testdir/test_spell.vim')
-rw-r--r-- | src/testdir/test_spell.vim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim new file mode 100644 index 000000000..e6c3729b1 --- /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 |