0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04:00

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:
Bram Moolenaar
2016-09-09 20:29:50 +02:00
parent d563883a1f
commit 16b3578f35
3 changed files with 56 additions and 13 deletions

View File

@@ -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