diff --git a/NEWS.md b/NEWS.md index dbeeb519..f5e1aafd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,7 @@ Red Panda C++ Version 0.13.3 - change: symbols that exactly match are sorted to the front in the code suggestion popup list - fix: symbols defind locally should be sorted to the front in the code suggestion popup list - fix: when show function tips, can't correctly calcuate the current position in the function param list + - fix: app will become very slow when processing very long lines. Red Panda C++ Version 0.13.2 - fix: "delete and exit" button in the environtment / folder option page doesn't work correctly diff --git a/RedPandaIDE/qsynedit/TextPainter.cpp b/RedPandaIDE/qsynedit/TextPainter.cpp index 3a40c7dd..23a69019 100644 --- a/RedPandaIDE/qsynedit/TextPainter.cpp +++ b/RedPandaIDE/qsynedit/TextPainter.cpp @@ -995,7 +995,7 @@ void SynEditTextPainter::PaintLines() throw BaseError(SynEdit::tr("The highlighter seems to be in an infinite loop")); } } - nTokenColumnsBefore = edit->charToColumn(sLine,edit->mHighlighter->getTokenPos()+1)-1; + //nTokenColumnsBefore = edit->charToColumn(sLine,edit->mHighlighter->getTokenPos()+1)-1; nTokenColumnLen = edit->stringColumns(sToken, nTokenColumnsBefore); if (nTokenColumnsBefore + nTokenColumnLen >= vFirstChar) { if (nTokenColumnsBefore + nTokenColumnLen >= vLastChar) { @@ -1040,11 +1040,12 @@ void SynEditTextPainter::PaintLines() AddHighlightToken(sToken, nTokenColumnsBefore - (vFirstChar - FirstCol), nTokenColumnLen, vLine,attr); } + nTokenColumnsBefore+=nTokenColumnLen; // Let the highlighter scan the next token. edit->mHighlighter->next(); } // Don't assume HL.GetTokenPos is valid after HL.GetEOL == True. - nTokenColumnsBefore += edit->stringColumns(sToken,nTokenColumnsBefore); + //nTokenColumnsBefore += edit->stringColumns(sToken,nTokenColumnsBefore); if (edit->mHighlighter->eol() && (nTokenColumnsBefore < vLastChar)) { int lineColumns = edit->mLines->lineColumns(vLine-1); // Draw text that couldn't be parsed by the highlighter, if any.