0
0
mirror of https://github.com/vim/vim.git synced 2025-10-05 05:34:07 -04:00

patch 8.2.4693: new regexp does not accept pattern "\%>0v"

Problem:    new regexp does not accept pattern "\%>0v".
Solution:   Do accept digit zero.
This commit is contained in:
Bram Moolenaar
2022-04-05 14:00:32 +01:00
parent 0f68e6c07a
commit 72bb10df1f
4 changed files with 23 additions and 3 deletions

View File

@@ -91,16 +91,29 @@ func Test_multi_failure()
set re=0
endfunc
func Test_column_failure()
func Test_column_success_failure()
new
call setline(1, 'xbar')
set re=1
%s/\%>0v./A/
call assert_equal('Abar', getline(1))
call assert_fails('/\%v', 'E71:')
call assert_fails('/\%>v', 'E71:')
call assert_fails('/\%c', 'E71:')
call assert_fails('/\%<c', 'E71:')
call assert_fails('/\%l', 'E71:')
set re=2
%s/\%>0v./B/
call assert_equal('Bbar', getline(1))
call assert_fails('/\%v', 'E1273:')
call assert_fails('/\%>v', 'E1273:')
call assert_fails('/\%c', 'E1273:')
call assert_fails('/\%<c', 'E1273:')
call assert_fails('/\%l', 'E1273:')
set re=0
bwipe!
endfunc
func Test_recursive_addstate()