summaryrefslogtreecommitdiff
path: root/src/testdir/test_gn.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-09-26 12:28:45 +0200
committerBram Moolenaar <Bram@vim.org>2017-09-26 12:28:45 +0200
commit22ab547dc281092d6a9d397db712a11733c38e97 (patch)
tree6b1bab7427c5c09d6545008706f37530760976c2 /src/testdir/test_gn.vim
parent7c456a4511dff70bb2fc23ebc3dc3d9201dbaacb (diff)
downloadvim-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.vim9
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