diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 11:30:32 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-17 11:30:32 +0800 |
| commit | 53c398d8f44f1796c216402c953512eb57733529 (patch) | |
| tree | a4abcbed4256058b40e4dc1badd2f06c22079abf /src/nvim/testdir/test_gn.vim | |
| parent | 9f837a5dcf61e0b27778dd7127036e12d694d92c (diff) | |
| parent | 7c3a87182d471649126c58d999d46abede6f60cd (diff) | |
| download | rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.gz rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.bz2 rneovim-53c398d8f44f1796c216402c953512eb57733529.zip | |
Merge pull request #19402 from zeertzjq/vim-8.2.0655
vim-patch:8.2.{0655,1040}: not enough tests
Diffstat (limited to 'src/nvim/testdir/test_gn.vim')
| -rw-r--r-- | src/nvim/testdir/test_gn.vim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_gn.vim b/src/nvim/testdir/test_gn.vim index d09b25b0e7..c4a41a6742 100644 --- a/src/nvim/testdir/test_gn.vim +++ b/src/nvim/testdir/test_gn.vim @@ -154,8 +154,24 @@ func Test_gn_command() norm! gg0f2vf7gNd call assert_equal(['1678'], getline(1,'$')) sil! %d _ - set wrapscan&vim + + " Without 'wrapscan', in visual mode, running gn without a match should fail + " but the visual mode should be kept. + set nowrapscan + call setline('.', 'one two') + let @/ = 'one' + call assert_beeps('normal 0wvlgn') + exe "normal y" + call assert_equal('tw', @") + + " with exclusive selection, run gn and gN + set selection=exclusive + normal 0gny + call assert_equal('one', @") + normal 0wgNy + call assert_equal('one', @") + set selection& endfunc func Test_gN_repeat() |