summaryrefslogtreecommitdiff
path: root/src/testdir/test_search.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-01-06 20:03:58 +0100
committerBram Moolenaar <Bram@vim.org>2017-01-06 20:03:58 +0100
commit6e450a57541676036203a72d40b2e604e938371e (patch)
tree4395ea731b069008270ed86e20cc3d0e3c8c983e /src/testdir/test_search.vim
parent287266527abc163e191a06dd70518bbbdab4468f (diff)
downloadvim-6e450a57541676036203a72d40b2e604e938371e.zip
patch 8.0.0147: searchpair() fails when 'magic' is off
Problem: searchpair() does not work when 'magic' is off. (Chris Paul) Solution: Add \m in the pattern. (Christian Brabandt, closes #1341)
Diffstat (limited to 'src/testdir/test_search.vim')
-rw-r--r--src/testdir/test_search.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 3b9aff4e7..040a8098a 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -279,3 +279,18 @@ func Test_use_sub_pat()
call X()
bwipe!
endfunc
+
+func Test_searchpair()
+ new
+ call setline(1, ['other code here', '', '[', '" cursor here', ']'])
+ 4
+ let a=searchpair('\[','',']','bW')
+ call assert_equal(3, a)
+ set nomagic
+ 4
+ let a=searchpair('\[','',']','bW')
+ call assert_equal(3, a)
+ set magic
+ q!
+endfunc
+