forked from aniani/vim
patch 7.4.2355
Problem: Regexp fails to match when using "\>\)\?". (Ramel)
Solution: When a state is already in the list, but addstate_here() is used
and the existing state comes later, add the new state anyway.
This commit is contained in:
@@ -53,3 +53,12 @@ func Test_nested_backrefs()
|
||||
bwipe!
|
||||
set re=0
|
||||
endfunc
|
||||
|
||||
func Test_eow_with_optional()
|
||||
let expected = ['abc def', 'abc', 'def', '', '', '', '', '', '', '']
|
||||
for re in range(0, 2)
|
||||
exe 'set re=' . re
|
||||
let actual = matchlist('abc def', '\(abc\>\)\?\s*\(def\)')
|
||||
call assert_equal(expected, actual)
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
Reference in New Issue
Block a user