summaryrefslogtreecommitdiffstats
path: root/src/textobject.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-10-15 21:23:28 +0200
committerBram Moolenaar <Bram@vim.org>2020-10-15 21:23:28 +0200
commita604ccc959c3bff88d3d5bc3c965819fc326d239 (patch)
tree315a9264bfbe152d10f3796970d26d9941264897 /src/textobject.c
parented234f24f3a6d697ba9b786d0bc74d4682bfdf47 (diff)
patch 8.2.1850: "vat" does not select tags correctly over line breakv8.2.1850
Problem: "vat" does not select tags correctly over line break. Solution: Adjust the search pattern. (Aufar Gilbran, closes #7136)
Diffstat (limited to 'src/textobject.c')
-rw-r--r--src/textobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/textobject.c b/src/textobject.c
index 23bdc96660..2d5d5ddfbc 100644
--- a/src/textobject.c
+++ b/src/textobject.c
@@ -1347,7 +1347,7 @@ again:
curwin->w_cursor = old_pos;
goto theend;
}
- spat = alloc(len + 31);
+ spat = alloc(len + 39);
epat = alloc(len + 9);
if (spat == NULL || epat == NULL)
{
@@ -1356,7 +1356,7 @@ again:
curwin->w_cursor = old_pos;
goto theend;
}
- sprintf((char *)spat, "<%.*s\\>\\%%(\\s\\_[^>]\\{-}[^/]>\\|>\\)\\c", len, p);
+ sprintf((char *)spat, "<%.*s\\>\\%%(\\_s\\_[^>]\\{-}\\_[^/]>\\|\\_s\\?>\\)\\c", len, p);
sprintf((char *)epat, "</%.*s>\\c", len, p);
r = do_searchpair(spat, (char_u *)"", epat, FORWARD, NULL,