correctly update old matching brackets

This commit is contained in:
royqh1979@gmail.com 2021-10-12 20:45:26 +08:00
parent 141de5ed74
commit e50a8d0faf
2 changed files with 3 additions and 1 deletions

View File

@ -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) {

View File

@ -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;