comparison src/testdir/test_gn.vim @ 18426:3b80bdbdc832 v8.1.2207

patch 8.1.2207: "gn" doesn't work quite right Commit: https://github.com/vim/vim/commit/edaad6e0a0e3c1fcb6a5c2771e647c52475bb19c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 24 15:23:37 2019 +0200 patch 8.1.2207: "gn" doesn't work quite right Problem: "gn" doesn't work quite right. (Jaehwang Jerry Jung) Solution: Improve and simplify the search logic. (Christian Brabandt, closes #5103, closes #5075)
author Bram Moolenaar <Bram@vim.org>
date Thu, 24 Oct 2019 15:30:03 +0200
parents 3b5d401a58ce
children 35e0ab1f2975
comparison
equal deleted inserted replaced
18425:d58c4ff92b3f 18426:3b80bdbdc832
126 $ 126 $
127 norm! cgnmatch 127 norm! cgnmatch
128 call assert_equal([' nnoremap', '', 'match'], getline(1,'$')) 128 call assert_equal([' nnoremap', '', 'match'], getline(1,'$'))
129 sil! %d_ 129 sil! %d_
130 130
131 " make sure it works correctly for one-char wide search items
132 call setline('.', ['abcdefghi'])
133 let @/ = 'a'
134 exe "norm! 0fhvhhgNgU"
135 call assert_equal(['ABCDEFGHi'], getline(1,'$'))
136 call setline('.', ['abcdefghi'])
137 let @/ = 'b'
138 exe "norm! 0fhvhhgngU"
139 call assert_equal(['abcdefghi'], getline(1,'$'))
140 sil! %d _
141 call setline('.', ['abcdefghi'])
142 let @/ = 'f'
143 exe "norm! 0vllgngU"
144 call assert_equal(['ABCDEFghi'], getline(1,'$'))
145 sil! %d _
146 call setline('.', ['12345678'])
147 let @/ = '5'
148 norm! gg0f7vhhhhgnd
149 call assert_equal(['12348'], getline(1,'$'))
150 sil! %d _
151
131 set wrapscan&vim 152 set wrapscan&vim
132 endfu 153 endfu
133 154
134 func Test_gn_multi_line() 155 func Test_gn_multi_line()
135 new 156 new