aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-17 10:55:18 +0800
committerzeertzjq <zeertzjq@outlook.com>2024-07-17 11:04:55 +0800
commite83949f96c59de706a175a017e6a080b838118d1 (patch)
tree547c36e88506a251bab9c40472958be345ad09a4 /test
parentccdbab7810bd40a44a0a502d478b0d06073388e9 (diff)
downloadrneovim-e83949f96c59de706a175a017e6a080b838118d1.tar.gz
rneovim-e83949f96c59de706a175a017e6a080b838118d1.tar.bz2
rneovim-e83949f96c59de706a175a017e6a080b838118d1.zip
vim-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 vim/vim#10938) https://github.com/vim/vim/commit/753aead960f163d0d3f8ce523ea523f2e0cec06d Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'test')
-rw-r--r--test/old/testdir/test_regexp_latin.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/old/testdir/test_regexp_latin.vim b/test/old/testdir/test_regexp_latin.vim
index 754fa8c868..ac46d0b17b 100644
--- a/test/old/testdir/test_regexp_latin.vim
+++ b/test/old/testdir/test_regexp_latin.vim
@@ -1151,7 +1151,13 @@ endfunc
" enddef
func Test_compare_column_matchstr()
+ " do some search in text to set the line number, it should be ignored in
+ " matchstr().
enew
+ call setline(1, ['one', 'two', 'three'])
+ :3
+ :/ee
+ bwipe!
set re=1
call assert_equal('aaa', matchstr('aaaaaaaaaaaaaaaaaaaa', '.*\%<5v'))
set re=2