0
0
mirror of https://github.com/vim/vim.git synced 2025-10-06 05:44:14 -04:00

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)
This commit is contained in:
Bram Moolenaar
2022-09-08 12:17:06 +01:00
parent b0d12e63e8
commit 753aead960
4 changed files with 21 additions and 9 deletions

View File

@@ -1145,7 +1145,13 @@ def Test_compare_columns()
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