aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-05-27 19:05:11 +0900
committererw7 <erw7.github@gmail.com>2019-06-04 09:53:55 +0900
commit485972dd64317e6a09ce7694cf0f903fb6d13cbd (patch)
tree6817fab9149d8969ad3eebda7727f29c5b8dcaf9 /src/nvim/testdir
parent16b1e8f9c070ad853c6c63b43591e297bf512662 (diff)
downloadrneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.tar.gz
rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.tar.bz2
rneovim-485972dd64317e6a09ce7694cf0f903fb6d13cbd.zip
vim-patch:8.1.0629: "gn" selects the wrong text with a multi-line match
Problem: "gn" selects the wrong text with a multi-line match. Solution: Get the end position from searchit() directly. (closes vim/vim#3695) https://github.com/vim/vim/commit/5d24a2257e597fd752e33b2c1e9c19cf9114a517
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_gn.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_gn.vim b/src/nvim/testdir/test_gn.vim
index 405425a42b..5e74289b00 100644
--- a/src/nvim/testdir/test_gn.vim
+++ b/src/nvim/testdir/test_gn.vim
@@ -133,4 +133,23 @@ func Test_gn_command()
set belloff&vim
endfu
+func Test_gn_multi_line()
+ new
+ call setline(1, [
+ \ 'func Tm1()',
+ \ ' echo "one"',
+ \ 'endfunc',
+ \ 'func Tm2()',
+ \ ' echo "two"',
+ \ 'endfunc',
+ \ 'func Tm3()',
+ \ ' echo "three"',
+ \ 'endfunc',
+ \])
+ /\v^func Tm\d\(\)\n.*\zs".*"\ze$
+ normal jgnrx
+ call assert_equal(' echo xxxxx', getline(5))
+ bwipe!
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab