mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 14:22:54 -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
bafafcc6ed
commit
e0866b62f4
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…
Add table
Add a link
Reference in a new issue