diff options
| author | Jaehwang Jerry Jung <tomtomjhj@gmail.com> | 2019-10-25 21:25:23 +0900 |
|---|---|---|
| committer | Jaehwang Jerry Jung <tomtomjhj@gmail.com> | 2019-10-27 03:35:19 +0900 |
| commit | c26466ae8b20a0a1a57935c712c2ebbca73bb35b (patch) | |
| tree | 16cd3e9dc298b03cd55480a430970ace62e6e586 /src/nvim/testdir | |
| parent | 034077ed1c1fa71aa15829ed2dfb27de4a5e5359 (diff) | |
| download | rneovim-c26466ae8b20a0a1a57935c712c2ebbca73bb35b.tar.gz rneovim-c26466ae8b20a0a1a57935c712c2ebbca73bb35b.tar.bz2 rneovim-c26466ae8b20a0a1a57935c712c2ebbca73bb35b.zip | |
vim-patch:8.1.2207: "gn" doesn't work quite right
Problem: "gn" doesn't work quite right. (Jaehwang Jerry Jung)
Solution: Improve and simplify the search logic. (Christian Brabandt,
closes vim/vim#5103, closes vim/vim#5075)
https://github.com/vim/vim/commit/edaad6e0a0e3c1fcb6a5c2771e647c52475bb19c
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_gn.vim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gn.vim b/src/nvim/testdir/test_gn.vim index 5e74289b00..77c5e8ecd5 100644 --- a/src/nvim/testdir/test_gn.vim +++ b/src/nvim/testdir/test_gn.vim @@ -129,6 +129,27 @@ func Test_gn_command() call assert_equal([' nnoremap', '', 'match'], getline(1,'$')) sil! %d_ + " make sure it works correctly for one-char wide search items + call setline('.', ['abcdefghi']) + let @/ = 'a' + exe "norm! 0fhvhhgNgU" + call assert_equal(['ABCDEFGHi'], getline(1,'$')) + call setline('.', ['abcdefghi']) + let @/ = 'b' + exe "norm! 0fhvhhgngU" + call assert_equal(['abcdefghi'], getline(1,'$')) + sil! %d _ + call setline('.', ['abcdefghi']) + let @/ = 'f' + exe "norm! 0vllgngU" + call assert_equal(['ABCDEFghi'], getline(1,'$')) + sil! %d _ + call setline('.', ['12345678']) + let @/ = '5' + norm! gg0f7vhhhhgnd + call assert_equal(['12348'], getline(1,'$')) + sil! %d _ + set wrapscan&vim set belloff&vim endfu |