]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix etags tagging by multiline regexps
authorEli Zaretskii <eliz@gnu.org>
Sat, 19 Oct 2024 08:18:45 +0000 (11:18 +0300)
committerEshel Yaron <me@eshelyaron.com>
Tue, 22 Oct 2024 18:55:59 +0000 (20:55 +0200)
* 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

index 4c9b954c9a3bae8d70deebaf618eeada5b6ab2eb..824a0f07af50b5c002f7cca58509dc2fcd2232a6 100644 (file)
@@ -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",