fix: Properly omit copyright information (#103)

This commit ensures that copyright information is always excluded and
that context is always split into prefix and suffix at correct position.
This commit is contained in:
Povilas Kanapickas
2025-03-06 14:00:15 +02:00
committed by GitHub
parent 8a167bf248
commit 61ca5c9a1b
3 changed files with 94 additions and 68 deletions

View File

@ -81,6 +81,11 @@ private:
QTextDocument *m_document;
QString m_mimeType;
QString m_filePath;
// Used to omit copyright headers from context. If context would otherwise include copyright
// header it is excluded by deleting it from the returned context. This means, that the
// returned context may contain less information than requested. If the cursor is within copyright
// header, then the context may be empty if the context window is small.
CopyrightInfo m_copyrightInfo;
};