diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-02-03 21:19:04 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-02-03 21:19:04 +0100 |
commit | cbf20fbcd3e9bb006f694bcc35da859930fb12a2 (patch) | |
tree | 93a6095bdf34946dcb6a39587d27c48a0f61021e /src/testdir/test_cmdline.vim | |
parent | 03ff9bcbc968f7d306e4a4e334e226fdde62ca82 (diff) | |
download | vim-git-cbf20fbcd3e9bb006f694bcc35da859930fb12a2.tar.gz |
patch 8.0.0298: Ex command range with repeated search does not workv8.0.0298
Problem: Ex command range with repeated search does not work. (Bruce
DeVisser)
Solution: Skip over \/, \? and \&.
Diffstat (limited to 'src/testdir/test_cmdline.vim')
-rw-r--r-- | src/testdir/test_cmdline.vim | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/testdir/test_cmdline.vim b/src/testdir/test_cmdline.vim index fcfce7354..aa8fb13c6 100644 --- a/src/testdir/test_cmdline.vim +++ b/src/testdir/test_cmdline.vim @@ -306,3 +306,28 @@ func Test_cmdline_complete_wildoptions() call assert_equal(a, b) bw! endfunc + +" using a leading backslash here +set cpo+=C + +func Test_cmdline_search_range() + new + call setline(1, ['a', 'b', 'c', 'd']) + /d + 1,\/s/b/B/ + call assert_equal('B', getline(2)) + + /a + $ + \?,4s/c/C/ + call assert_equal('C', getline(3)) + + call setline(1, ['a', 'b', 'c', 'd']) + %s/c/c/ + 1,\&s/b/B/ + call assert_equal('B', getline(2)) + + bwipe! +endfunc + +set cpo& |