mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-24 15:25:10 +02:00
IDE: quick syntax check gives Ok when no errors found, bug #1317
git-svn-id: trunk@18270 -
This commit is contained in:
parent
162095d09e
commit
c430f7a515
@ -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 ...';
|
||||
|
@ -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;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user