From: Kornel Benko Date: Thu, 14 Jan 2021 22:25:58 +0000 (+0100) Subject: FindAdv: Discard the optional arguments of \part, \chapter, ... X-Git-Tag: 2.4.0-alpha3~284 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=dff9438a3604c689112be71f67f659bc44a0420d;p=lyx.git FindAdv: Discard the optional arguments of \part, \chapter, ... Not easy selectable anyway, and hard to use while searching. --- diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 176125c5a9..c816bcc3e8 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -2085,6 +2085,10 @@ void LatexInfo::buildEntries(bool isPatternString) key += interval_.par.substr(params, optend-params); evaluatingOptional = true; optionalEnd = optend; + if (found.keytype == KeyInfo::isSectioning) { + // Remove optional values (but still keep in header) + interval_.addIntervall(params, optend); + } } string token = sub.str(7); int closings;