IDE: fixed complete block, bug #24935

git-svn-id: trunk@42865 -
This commit is contained in:
mattias 2013-09-18 21:05:17 +00:00
parent dfb5099c23
commit c0dac09b7f
2 changed files with 5 additions and 3 deletions

View File

@ -6091,7 +6091,9 @@ begin
Beauty:=SourceChangeCache.BeautifyCodeOptions;
InitStack(Stack);
try
//DebugLn(['TStandardCodeTool.CompleteBlock ',StartNode.DescAsString]);
{$IFDEF VerboseCompleteBlock}
DebugLn(['TStandardCodeTool.CompleteBlock ',StartNode.DescAsString]);
{$ENDIF}
if StartNode.Desc in AllPascalStatements then begin
while (StartNode.Parent<>nil)

View File

@ -3321,7 +3321,7 @@ begin
begin
AddChar:=true;
if AutoCompleteChar(aChar,AddChar,acoLineBreak) then ;
//DebugLn(['TSourceEditor.ProcessCommand ecLineBreak AddChar=',AddChar]);
//DebugLn(['TSourceEditor.ProcessCommand ecLineBreak AddChar=',AddChar,' EditorOpts.AutoBlockCompletion=',EditorOpts.AutoBlockCompletion]);
if not AddChar then Command:=ecNone;
if EditorOpts.AutoBlockCompletion then
AutoCompleteBlock;
@ -4415,7 +4415,7 @@ var
NewCode: TCodeBuffer;
NewX, NewY, NewTopLine: integer;
begin
if not LazarusIDE.SaveSourceEditorChangesToCodeCache(self) then exit;
LazarusIDE.SaveSourceEditorChangesToCodeCache(Self);
XY:=FEditor.LogicalCaretXY;
FEditor.BeginUndoBlock{$IFDEF SynUndoDebugBeginEnd}('TSourceEditor.AutoCompleteBlock'){$ENDIF};
FEditor.BeginUpdate;