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)
diff --git a/src/testdir/test_regexp_latin.vim b/src/testdir/test_regexp_latin.vim
index 6f3ffe2..8df357f 100644
--- a/src/testdir/test_regexp_latin.vim
+++ b/src/testdir/test_regexp_latin.vim
@@ -1145,7 +1145,13 @@
enddef
def Test_compare_column_matchstr()
+ # do some search in text to set the line number, it should be ignored in
+ # matchstr().
enew
+ setline(1, ['one', 'two', 'three'])
+ :3
+ :/ee
+ bwipe!
set re=1
call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
set re=2