Hi all,
The submatch() function with a second argument set to 1, returns NULL
when used outside of a :substitute command or the substitute() function.
All the other functions that return a List, return an empty List on failure.
But the submatch() function returns NULL on failure. e.g.
call assert_equal([], submatch(0, 1))
echo v:errors
The returned value cannot be compared against NULL. I think the submatch()
function should be changed to return an empty List.
- Yegappan
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/CAAW7x7mu%3D-%3Dd6oOOfX7HpnLJZRmQJDuzru6q%3D3R_ERvNXMFCCA%40mail.gmail.com.