aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-08-05 13:26:36 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-08-06 23:25:49 +0200
commit120d1b80c9aa3ad39902310a99f5d19f41ca4bb8 (patch)
tree4bba1671a5cd6ae608640ff6576e69d78fa59f55 /src/nvim/testdir
parent644fa6537cfda6281f6ac6c837b9a08fa35fb516 (diff)
downloadrneovim-120d1b80c9aa3ad39902310a99f5d19f41ca4bb8.tar.gz
rneovim-120d1b80c9aa3ad39902310a99f5d19f41ca4bb8.tar.bz2
rneovim-120d1b80c9aa3ad39902310a99f5d19f41ca4bb8.zip
vim-patch:8.0.0147 #7121
Problem: searchpair() does not work when 'magic' is off. (Chris Paul) Solution: Add \m in the pattern. (Christian Brabandt, closes vim/vim#1341) https://github.com/vim/vim/commit/6e450a57541676036203a72d40b2e604e938371e
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_search.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim
index 2106fc2dec..a333e7f206 100644
--- a/src/nvim/testdir/test_search.vim
+++ b/src/nvim/testdir/test_search.vim
@@ -283,3 +283,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
+