fix: Correctly pick whole file context (#85)

Currently the current line is duplicated in both "before" and "after"
context. This is due to DocumentContextReader::readWholeFileAfter()
picking the current line part of which has been already included into
the "before" context.
This commit is contained in:
Povilas Kanapickas
2025-03-05 20:17:51 +02:00
committed by GitHub
parent 247256d4a4
commit f9f2a86cea
3 changed files with 87 additions and 22 deletions

View File

@ -46,7 +46,8 @@ public:
QString readWholeFileAfter(int lineNumber, int cursorPosition) const;
QString getLanguageAndFileInfo() const;
CopyrightInfo findCopyright();
QString getContextBetween(int startLine, int endLine, int cursorPosition) const;
QString getContextBetween(
int startLine, int startCursorPosition, int endLine, int endCursorPosition) const;
CopyrightInfo copyrightInfo() const;