vim-patch:7.4.1305 #5094

Problem:    "\%1l^#.*" does not match on a line starting with "#".
Solution:   Do not clear the start-of-line flag. (Christian Brabandt)

7c29f38781

Helped-by: jamessan
Helped-by: mhinz
This commit is contained in:
Michael Ennen
2016-07-19 23:24:42 -07:00
committed by Justin M. Keyes
parent 23f591dba0
commit 6fe8c1d051
4 changed files with 42 additions and 20 deletions

View File

@@ -268,4 +268,15 @@ describe('character classes in regexp', function()
ABCDEFGHIXYZ
ABCDEFGHIXYZ]])
end)
it([["\%1l^#.*" does not match on a line starting with "#". (vim-patch:7.4.1305)]], function()
source([[
1 s/\%#=0\%1l^\t...//g
2 s/\%#=1\%2l^\t...//g
3 s/\%#=2\%3l^\t...//g
4 s/\%#=0\%4l^\t...//g
5 s/\%#=1\%5l^\t...//g
6 s/\%#=2\%6l^\t...//g]])
diff(sixlines(string.sub(punct1, 1)..digits..punct2..upper..punct3..
lower..punct4..ctrl2..iso_text))
end)
end)