diff --git a/libs/qsynedit/qsynedit/document.cpp b/libs/qsynedit/qsynedit/document.cpp index e99467c1..3e73af05 100644 --- a/libs/qsynedit/qsynedit/document.cpp +++ b/libs/qsynedit/qsynedit/document.cpp @@ -1244,14 +1244,6 @@ QList Document::getGlyphStartCharList(int line, const QString &lineText) return mLines[line]->glyphStartCharList(); } -QList Document::getGlyphStartPositionList(int line, const QString &lineText, int &lineWidth) -{ - if (line<0 || line>=count() || mLines[line]->lineText()!=lineText) - return calcGlyphPositionList(lineText,lineWidth); - lineWidth = mLines[line]->width(); - return mLines[line]->glyphStartPositionList(); -} - NewlineType Document::getNewlineType() { QMutexLocker locker(&mMutex); diff --git a/libs/qsynedit/qsynedit/document.h b/libs/qsynedit/qsynedit/document.h index 4b47a0a0..84af1c46 100644 --- a/libs/qsynedit/qsynedit/document.h +++ b/libs/qsynedit/qsynedit/document.h @@ -595,7 +595,6 @@ private: QList calcGlyphPositionList(const QString& lineText, const QList &glyphStartCharList, int left, int &right) const; QList calcGlyphPositionList(const QString& lineText, int &width) const; QList getGlyphStartCharList(int line, const QString &lineText); - QList getGlyphStartPositionList(int line, const QString &lineText, int &lineWidth); bool tryLoadFileByEncoding(QByteArray encodingName, QFile& file); void loadUTF16BOMFile(QFile& file); void loadUTF32BOMFile(QFile& file); diff --git a/libs/qsynedit/qsynedit/painter.cpp b/libs/qsynedit/qsynedit/painter.cpp index cd514187..7ca31da7 100644 --- a/libs/qsynedit/qsynedit/painter.cpp +++ b/libs/qsynedit/qsynedit/painter.cpp @@ -1036,9 +1036,10 @@ void QSynEditPainter::paintLines() mRcToken = mRcLine; - int lineWidth; QList glyphStartCharList = mEdit->mDocument->getGlyphStartCharList(vLine-1,sLine); - QList glyphStartPositionsList = mEdit->mDocument->getGlyphStartPositionList(vLine-1,sLine, lineWidth); + // Ensure the list has the right number of elements. + // Values in it doesn't matter, we'll recalculate them. + QList glyphStartPositionsList = glyphStartCharList; // Initialize highlighter with line text and range info. It is // necessary because we probably did not scan to the end of the last // line - the internal highlighter range might be wrong.