IDE: quick syntax check gives Ok when no errors found, bug #1317

git-svn-id: trunk@18270 -
This commit is contained in:
mattias 2009-01-13 09:57:40 +00:00
parent 162095d09e
commit c430f7a515
2 changed files with 8 additions and 2 deletions

View File

@ -358,6 +358,7 @@ resourcestring
lisMenuConfigExternalTools = 'Configure external tools ...';
lisMenuQuickSyntaxCheck = 'Quick syntax check';
lisMenuQuickSyntaxCheckOk = 'Quick syntax check OK';
lisMenuGuessUnclosedBlock = 'Guess unclosed block';
lisMenuGuessMisplacedIFDEF = 'Guess misplaced IFDEF/ENDIF';
lisMenuMakeResourceString = 'Make Resource String ...';

View File

@ -10386,12 +10386,17 @@ begin
or (ActiveSrcEdit=nil) then exit;
SaveSourceEditorChangesToCodeCache(-1);
CodeToolBoss.VisibleEditorLines:=ActiveSrcEdit.EditorComponent.LinesInWindow;
if not CodeToolBoss.CheckSyntax(ActiveUnitInfo.Source,NewCode,NewX,NewY,
if CodeToolBoss.CheckSyntax(ActiveUnitInfo.Source,NewCode,NewX,NewY,
NewTopLine,ErrorMsg) then
begin
DoArrangeSourceEditorAndMessageView(false);
MessagesView.ClearTillLastSeparator;
MessagesView.AddSeparator;
MessagesView.AddMsg(lisMenuQuickSyntaxCheckOk,'',-1);
end else begin
DoJumpToCodeToolBossError;
end;
if (ErrorMsg='') or (NewTopLine=0) or (NewX=0) or (NewY=0) or (NewCode=nil) then ;
if (ErrorMsg='') or (NewTopLine=0) or (NewX=0) or (NewY=0) or (NewCode=nil) then ; // avoid compiler hints about parameters not used
end;
//-----------------------------------------------------------------------------