aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-12-02 15:25:24 +0800
committerckelsel <ckelsel@hotmail.com>2017-12-02 15:40:57 +0800
commit585d664b7b0d5032082bdc3ca8a17bc7fa34a4e8 (patch)
tree59cc430f2429c027120b90b4e5548b33b466773a /src/nvim/testdir
parent27f9b1c7b029d8f61723fd261bed76ea7a01e68d (diff)
downloadrneovim-585d664b7b0d5032082bdc3ca8a17bc7fa34a4e8.tar.gz
rneovim-585d664b7b0d5032082bdc3ca8a17bc7fa34a4e8.tar.bz2
rneovim-585d664b7b0d5032082bdc3ca8a17bc7fa34a4e8.zip
vim-patch:8.0.0298
Problem: Ex command range with repeated search does not work. (Bruce DeVisser) Solution: Skip over \/, \? and \&. https://github.com/vim/vim/commit/cbf20fbcd3e9bb006f694bcc35da859930fb12a2
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_cmdline.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim
index 5fc519f822..ac44e09a5a 100644
--- a/src/nvim/testdir/test_cmdline.vim
+++ b/src/nvim/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&