patch 8.0.1239: cannot use a lambda for the skip argument to searchpair()
Problem: Cannot use a lambda for the skip argument to searchpair().
Solution: Evaluate a partial, funcref and lambda. (LemonBoy, closes #1454,
closes #2265)
diff --git a/src/search.c b/src/search.c
index e56cb1b..25c2e6e 100644
--- a/src/search.c
+++ b/src/search.c
@@ -4015,7 +4015,7 @@
{
if (do_searchpair((char_u *)"<[^ \t>/!]\\+\\%(\\_s\\_[^>]\\{-}[^/]>\\|$\\|\\_s\\=>\\)",
(char_u *)"",
- (char_u *)"</[^>]*>", BACKWARD, (char_u *)"", 0,
+ (char_u *)"</[^>]*>", BACKWARD, NULL, 0,
NULL, (linenr_T)0, 0L) <= 0)
{
curwin->w_cursor = old_pos;
@@ -4049,7 +4049,7 @@
sprintf((char *)spat, "<%.*s\\>\\%%(\\s\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p);
sprintf((char *)epat, "</%.*s>\\c", len, p);
- r = do_searchpair(spat, (char_u *)"", epat, FORWARD, (char_u *)"",
+ r = do_searchpair(spat, (char_u *)"", epat, FORWARD, NULL,
0, NULL, (linenr_T)0, 0L);
vim_free(spat);