From e0866b62f41dc3bd2fb71e363f9cb2cc2f2a23f9 Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 19 May 2017 06:50:33 +0000 Subject: [PATCH] CodeEditor: CSyntax Indent after label or access control git-svn-id: svn://ultimatepp.org/upp/trunk@11108 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/CodeEditor/CLogic.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uppsrc/CodeEditor/CLogic.cpp b/uppsrc/CodeEditor/CLogic.cpp index 56911e87f..fd5af483e 100644 --- a/uppsrc/CodeEditor/CLogic.cpp +++ b/uppsrc/CodeEditor/CLogic.cpp @@ -75,7 +75,8 @@ void CSyntax::IndentInsert0(CodeEditor& e, int chr, int count, bool reformat) e.InsertChar(*s++, 1); if(!syntax) return; - if(syntax->stmtline == cl || syntax->blk.GetCount() && syntax->blk.Top() == cl) { + if(syntax->stmtline == cl || syntax->blk.GetCount() && syntax->blk.Top() == cl // statement (if, while..) || first line of block + || *pl.Last() == ':') { // label if(indent_spaces || (s > pl && s[-1] == ' ')) e.InsertChar(' ', indent_amount); else