mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:39:15 +02:00
IDE: quick fix add local var: check identifier at position
git-svn-id: trunk@45340 -
This commit is contained in:
parent
a7c4d5af38
commit
23870bf288
@ -2284,10 +2284,7 @@ begin
|
||||
else if IsMsgID(MsgLine,FPCMsgIDThereWereErrorsCompiling,
|
||||
fMsgItemThereWereErrorsCompiling)
|
||||
then
|
||||
MsgLine.Urgency:=mluVerbose
|
||||
else if IsMsgID(MsgLine,FPCMsgIDIdentifierNotFound,fMsgItemIdentifierNotFound)
|
||||
then
|
||||
MsgLine.Flags:=MsgLine.Flags+[mlfLeftToken];
|
||||
MsgLine.Urgency:=mluVerbose;
|
||||
inherited AddMsgLine(MsgLine);
|
||||
end;
|
||||
|
||||
|
@ -430,8 +430,7 @@ begin
|
||||
exit;
|
||||
if not Msg.HasSourcePosition or not IsValidIdent(Identifier) then exit;
|
||||
|
||||
// check if message position is at end of identifier
|
||||
// (FPC gives position of end of identifier)
|
||||
// check if message position is at identifier
|
||||
Code:=CodeToolBoss.LoadFile(Msg.GetFullFilename,true,false);
|
||||
if Code=nil then exit;
|
||||
if not CodeToolBoss.Explore(Code,Tool,false) then exit;
|
||||
@ -440,7 +439,10 @@ begin
|
||||
if Node=nil then exit;
|
||||
if not (Node.Desc in AllPascalStatements) then exit;
|
||||
Tool.MoveCursorToCleanPos(CleanPos);
|
||||
Tool.ReadPriorAtom;
|
||||
if mlfLeftToken in Msg.Flags then
|
||||
Tool.ReadPriorAtom
|
||||
else
|
||||
Tool.ReadNextAtom;
|
||||
if not Tool.AtomIs(Identifier) then exit;
|
||||
Tool.ReadPriorAtom;
|
||||
if (Tool.CurPos.Flag in [cafPoint,cafRoundBracketClose,cafEdgedBracketClose,
|
||||
|
Loading…
Reference in New Issue
Block a user