- fix: indent lines displayed at wrong position, when there are folded lines

This commit is contained in:
Roy Qu 2022-01-24 16:08:24 +08:00
parent f21eded1ad
commit 2c8a7d29dd
2 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,7 @@ Red Panda C++ Version 0.13.3
- fix: project files' charset settings doesn't work correctly - fix: project files' charset settings doesn't work correctly
- enhancement: add exec charset option to compiler set settings - enhancement: add exec charset option to compiler set settings
- fix: when open a file, all blank lines's indents are removed. - fix: when open a file, all blank lines's indents are removed.
- fix: indent lines displayed at wrong position, when there are folded lines
Red Panda C++ Version 0.13.2 Red Panda C++ Version 0.13.2
- fix: "delete and exit" button in the environtment / folder option page doesn't work correctly - fix: "delete and exit" button in the environtment / folder option page doesn't work correctly

View File

@ -720,10 +720,11 @@ void SynEditTextPainter::PaintFoldAttributes()
// Now loop through all the lines. The indices are valid for Lines. // Now loop through all the lines. The indices are valid for Lines.
for (cRow = aFirstRow; cRow<=aLastRow;cRow++) { for (cRow = aFirstRow; cRow<=aLastRow;cRow++) {
vLine = edit->rowToLine(cRow); vLine = edit->rowToLine(cRow);
qDebug()<<cRow<<vLine;
if (vLine > edit->mLines->count() && edit->mLines->count() > 0) if (vLine > edit->mLines->count() && edit->mLines->count() > 0)
break; break;
// Set vertical coord // Set vertical coord
Y = (vLine - edit->mTopLine) * edit->mTextHeight; // limit inside clip rect Y = (cRow - edit->mTopLine) * edit->mTextHeight; // limit inside clip rect
if (edit->mTextHeight % 2 == 1 && vLine % 2 == 0) { if (edit->mTextHeight % 2 == 1 && vLine % 2 == 0) {
Y++; Y++;
} }