diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-09-26 12:28:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-09-26 12:28:45 +0200 |
commit | 22ab547dc281092d6a9d397db712a11733c38e97 (patch) | |
tree | 6b1bab7427c5c09d6545008706f37530760976c2 /src/testdir/test_gn.vim | |
parent | 7c456a4511dff70bb2fc23ebc3dc3d9201dbaacb (diff) | |
download | vim-git-22ab547dc281092d6a9d397db712a11733c38e97.tar.gz |
patch 8.0.1148: gN doesn't work on last match with 'wrapscan' offv8.0.1148
Problem: "gN" doesn't work on last match with 'wrapscan' off. (fcpg)
Solution: Adjust for searching backward. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_gn.vim')
-rw-r--r-- | src/testdir/test_gn.vim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_gn.vim b/src/testdir/test_gn.vim index b2a2937d8..f56e707da 100644 --- a/src/testdir/test_gn.vim +++ b/src/testdir/test_gn.vim @@ -111,6 +111,15 @@ func Test_gn_command() call assert_equal(['foo baz'], getline(1,'$')) sil! %d_ + " search upwards with nowrapscan set + call setline('.', ['foo', 'bar', 'foo', 'baz']) + set nowrapscan + let @/='foo' + $ + norm! dgN + call assert_equal(['foo', 'bar', '', 'baz'], getline(1,'$')) + sil! %d_ + set wrapscan&vim set belloff&vim endfu |