mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 07:30:19 +02:00
IDE: auto ident: added debugging
git-svn-id: trunk@22317 -
This commit is contained in:
parent
81cea79ed2
commit
84db9b3f2f
@ -38,12 +38,13 @@
|
||||
Examples for beautification styles: see scanexamples/indentation.pas
|
||||
|
||||
ToDo:
|
||||
- if true then
|
||||
exit;|
|
||||
|
|
||||
- selection
|
||||
- fix last line after pressing return key:
|
||||
if true then
|
||||
exit;|
|
||||
|
|
||||
- if true then |
|
||||
|exit;
|
||||
- paste
|
||||
}
|
||||
unit CodeBeautifier;
|
||||
|
||||
@ -1079,7 +1080,7 @@ begin
|
||||
Policies.Code.Source:=Source;
|
||||
{$ENDIF}
|
||||
// parse source in front
|
||||
//DebugLn(['TFullyAutomaticBeautifier.GetIndent "',copy(Source,1,CleanPos-1),'"']);
|
||||
DebugLn(['TFullyAutomaticBeautifier.GetIndent "',dbgstr(copy(Source,CleanPos-10,10)),'|',dbgstr(copy(Source,CleanPos,10)),'"']);
|
||||
ParseSource(Source,1,CleanPos,NewNestedComments,Stack,Policies,
|
||||
LastAtomStart,LastAtomEnd);
|
||||
WriteDebugReport('After parsing code in front:',Stack);
|
||||
|
@ -14451,6 +14451,9 @@ begin
|
||||
CodeBuf:=SrcEditor.CodeBuffer;
|
||||
CodeBuf.LineColToPosition(LogCaret.Y,LogCaret.X,p);
|
||||
if p<1 then exit;
|
||||
DebugLn(['TMainIDE.OnSrcNoteBookGetIndent Firstline+0=',SrcEditor.Lines[FirstLinePos]]);
|
||||
if FirstLinePos<SrcEditor.LineCount then
|
||||
DebugLn(['TMainIDE.OnSrcNoteBookGetIndent Firstline+1=',SrcEditor.Lines[FirstLinePos+1]]);
|
||||
NestedComments:=CodeToolBoss.GetNestedCommentsFlagForFile(CodeBuf.Filename);
|
||||
if not CodeToolBoss.Indenter.GetIndent(CodeBuf.Source,p,NestedComments,NewIndent)
|
||||
then exit;
|
||||
|
Loading…
Reference in New Issue
Block a user