commit dff9438a3604c689112be71f67f659bc44a0420d
Author: Kornel Benko <[email protected]>
Date: Thu Jan 14 23:25:58 2021 +0100
FindAdv: Discard the optional arguments of \part, \chapter, ...
Not easy selectable anyway, and hard to use while searching.
---
src/lyxfind.cpp | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp
index 176125c..c816bcc 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;
--
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs