From 9933f282b1f37570eae54e3c977824129843d9ba Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Oct 2024 11:18:45 +0300 Subject: [PATCH] Fix etags tagging by multiline regexps * lib-src/etags.c (regex_tag_multiline): Fix off-by-one error in determining the end of the tag matched by a multiline regexp. (Bug#73771) * test/manual/etags/ETAGS.good_4: * test/manual/etags/ETAGS.good_5: * test/manual/etags/ETAGS.good_6: Adjust test results to the above change. (cherry picked from commit d0be0965ca344caab7879b2ac2373a68025c9ba2) --- lib-src/etags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib-src/etags.c b/lib-src/etags.c index 4c9b954c9a3..824a0f07af5 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -7380,7 +7380,7 @@ regex_tag_multiline (void) /* Force explicit tag name, if a name is there. */ pfnote (name, true, buffer + linecharno, - charno - linecharno + 1, lineno, linecharno); + charno - linecharno, lineno, linecharno); if (debug) fprintf (stderr, "%s on %s:%"PRIdMAX": %s\n", -- 2.39.2