- fix: indents for "default" are not the same with "case"

This commit is contained in:
Roy Qu 2022-07-30 10:22:27 +08:00
parent fc1de8f28c
commit 66746e8c3d
2 changed files with 4 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Red Panda C++ Version 1.1.6
- fix: Drag&Drop no correctly disabled for readonly editors - fix: Drag&Drop no correctly disabled for readonly editors
- enhancement: disable column mode in readonly editors - enhancement: disable column mode in readonly editors
- fix: inefficient loop when render long lines - fix: inefficient loop when render long lines
- fix: indents for "default" are not the same with "case"
Red Panda C++ Version 1.1.5 Red Panda C++ Version 1.1.5

View File

@ -1608,7 +1608,9 @@ int SynEdit::calcIndentSpaces(int line, const QString& lineText, bool addIndent)
&& lineText.endsWith(':') && lineText.endsWith(':')
&& ( && (
firstToken == "public" || firstToken == "private" firstToken == "public" || firstToken == "private"
|| firstToken == "protected" || firstToken == "case")) { || firstToken == "protected" || firstToken == "case"
|| firstToken == "default"
)) {
// public: private: protecte: case: should indents like it's parent statement // public: private: protecte: case: should indents like it's parent statement
mHighlighter->setState(rangePreceeding); mHighlighter->setState(rangePreceeding);
mHighlighter->setLine("}",line-1); mHighlighter->setLine("}",line-1);