mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-10-06 00:30:10 -06:00
CodeEditor: CSyntax Indent after label or access control
git-svn-id: svn://ultimatepp.org/upp/trunk@11108 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
fb3304419c
commit
0bb31a3540
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue