comparison src/testdir/test_gn.vim @ 15239:db5d2429bda3 v8.1.0629

patch 8.1.0629: "gn" selects the wrong text with a multi-line match commit https://github.com/vim/vim/commit/5d24a2257e597fd752e33b2c1e9c19cf9114a517 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 23 19:10:09 2018 +0100 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 https://github.com/vim/vim/issues/3695)
author Bram Moolenaar <Bram@vim.org>
date Sun, 23 Dec 2018 19:15:05 +0100
parents 96933f0ecbd1
children 3b5d401a58ce
comparison
equal deleted inserted replaced
15238:85705008bb7a 15239:db5d2429bda3
129 sil! %d_ 129 sil! %d_
130 130
131 set wrapscan&vim 131 set wrapscan&vim
132 endfu 132 endfu
133 133
134 func Test_gn_multi_line()
135 new
136 call setline(1, [
137 \ 'func Tm1()',
138 \ ' echo "one"',
139 \ 'endfunc',
140 \ 'func Tm2()',
141 \ ' echo "two"',
142 \ 'endfunc',
143 \ 'func Tm3()',
144 \ ' echo "three"',
145 \ 'endfunc',
146 \])
147 /\v^func Tm\d\(\)\n.*\zs".*"\ze$
148 normal jgnrx
149 call assert_equal(' echo xxxxx', getline(5))
150 bwipe!
151 endfunc
152
134 " vim: shiftwidth=2 sts=2 expandtab 153 " vim: shiftwidth=2 sts=2 expandtab