commit 73514889b9a39ded4cc01ceda0ed2cc6f8b84454 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Tue Apr 8 09:51:02 2025 +0200
Exit early on externalFilenames() with internal buffers These do not need these names and would report false positives due to their differing filenames --- src/insets/InsetRef.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetRef.cpp b/src/insets/InsetRef.cpp index 08febbaaf6..afa71fb0f5 100644 --- a/src/insets/InsetRef.cpp +++ b/src/insets/InsetRef.cpp @@ -999,6 +999,11 @@ bool InsetRef::useRange() const vector<FileName> InsetRef::externalFilenames(bool const warn) const { vector<FileName> res; + if (buffer().isInternal()) + // internal buffers (with their own filenames) + // are excluded from this. + return res; + // check whether the included file exist vector<string> incFileNames = getVectorFromString(ltrim(to_utf8(params()["filenames"]))); ListOfBuffers const children = buffer().masterBuffer()->getDescendants(); @@ -1008,8 +1013,8 @@ vector<FileName> InsetRef::externalFilenames(bool const warn) const FileName fn = support::makeAbsPath(incFileName, support::onlyPath(buffer().absFileName())); - if (buffer().fileName() == fn || buffer().isInternal()) - // ignore own file and internal buffers + if (buffer().fileName() == fn) + // ignore own file continue; if (fn.exists()) { bool is_family = false; -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs