comparison src/testdir/test_regexp_latin.vim @ 30156:d58331e0f14a v9.0.0414

patch 9.0.0414: matchstr() still does not match column offset Commit: https://github.com/vim/vim/commit/753aead960f163d0d3f8ce523ea523f2e0cec06d Author: Bram Moolenaar <Bram@vim.org> Date: Thu Sep 8 12:17:06 2022 +0100 patch 9.0.0414: matchstr() still does not match column offset Problem: matchstr() still does not match column offset when done after a text search. Solution: Only use the line number for a multi-line search. Fix the test. (closes #10938)
author Bram Moolenaar <Bram@vim.org>
date Thu, 08 Sep 2022 13:30:03 +0200
parents 22a5ccc0d634
children dbec60b8c253
comparison
equal deleted inserted replaced
30155:a85a8accd273 30156:d58331e0f14a
1143 bwipe! 1143 bwipe!
1144 prop_type_delete('name') 1144 prop_type_delete('name')
1145 enddef 1145 enddef
1146 1146
1147 def Test_compare_column_matchstr() 1147 def Test_compare_column_matchstr()
1148 # do some search in text to set the line number, it should be ignored in
1149 # matchstr().
1148 enew 1150 enew
1151 setline(1, ['one', 'two', 'three'])
1152 :3
1153 :/ee
1154 bwipe!
1149 set re=1 1155 set re=1
1150 call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v')) 1156 call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
1151 set re=2 1157 set re=2
1152 call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v')) 1158 call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
1153 set re=0 1159 set re=0