diff --git a/NEWS.md b/NEWS.md index 56318f2d..0e599635 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,8 @@ Version 0.7.6 - change: don't auto insert a new line when input an enter between '(' and ')' or between '[' and ']' (indent instead) - enhancement: the line containing '}' will use the indents of the matching '{' line, instead of just unindent one level + - enhancement: the line containing 'public:' / 'private:' / 'protected:' / 'case *:' will use of indents of the surrounding '{' line, instead of just unindent one level + - enhancement: correctly handle auto indents for multi-level embedding complex statements like 'for(...) if (...) printf(); Version 0.7.5 - enhancement: more accurate auto indent calculation diff --git a/RedPandaIDE/qsynedit/highlighter/cpp.cpp b/RedPandaIDE/qsynedit/highlighter/cpp.cpp index 349c9987..226655d2 100644 --- a/RedPandaIDE/qsynedit/highlighter/cpp.cpp +++ b/RedPandaIDE/qsynedit/highlighter/cpp.cpp @@ -926,7 +926,7 @@ void SynEditCppHighlighter::semiColonProc() mExtTokenId = ExtTokenKind::SemiColon; if (mRange.state == RangeState::rsAsm) mRange.state = RangeState::rsUnknown; - if (mRange.getLastIndent() == sitStatement) { + while (mRange.getLastIndent() == sitStatement) { popIndents(sitStatement); } }