diff --git a/RedPandaIDE/editor.cpp b/RedPandaIDE/editor.cpp index 4e37d444..b3999970 100644 --- a/RedPandaIDE/editor.cpp +++ b/RedPandaIDE/editor.cpp @@ -1326,6 +1326,8 @@ void Editor::onStatusChanged(SynStatusChanges changes) if (changes.testFlag(SynStatusChange::scCaretX) || changes.testFlag(SynStatusChange::scCaretY)) { + invalidateLine(mHighlightCharPos1.Line); + invalidateLine(mHighlightCharPos2.Line); mHighlightCharPos1 = BufferCoord{0,0}; mHighlightCharPos2 = BufferCoord{0,0}; if (mTabStopBegin >=0) { diff --git a/RedPandaIDE/qsynedit/TextPainter.cpp b/RedPandaIDE/qsynedit/TextPainter.cpp index d80fb66e..8caa3364 100644 --- a/RedPandaIDE/qsynedit/TextPainter.cpp +++ b/RedPandaIDE/qsynedit/TextPainter.cpp @@ -668,7 +668,7 @@ void SynEditTextPainter::PaintFoldAttributes() } // Get next nonblank line LastNonBlank = vLine - 1; - while (LastNonBlank + 1 < edit->mLines->count() && edit->mLines->getString(LastNonBlank).trimmed().isEmpty()) + while (LastNonBlank + 1 < edit->mLines->count() && edit->mLines->getString(LastNonBlank).isEmpty()) LastNonBlank++; LineIndent = edit->getLineIndent(edit->mLines->getString(LastNonBlank)); int braceLevel = edit->mLines->ranges(LastNonBlank).braceLevel;