mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
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.
16b3578f35
This commit is contained in:
@@ -97,3 +97,12 @@ func Test_recursive_substitute()
|
||||
call setwinvar(1, 'myvar', 1)
|
||||
bwipe!
|
||||
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