mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 11:26:00 +02:00
IDE: improve msg cant find unit: fixed loading unit if msg is showing the right unit
git-svn-id: trunk@39951 -
This commit is contained in:
parent
37534fa58e
commit
95827bfb41
@ -474,6 +474,7 @@ begin
|
|||||||
if Dir='' then exit;
|
if Dir='' then exit;
|
||||||
|
|
||||||
Msg.GetSourcePosition(Filename,Line,Col);
|
Msg.GetSourcePosition(Filename,Line,Col);
|
||||||
|
Filename:=TrimFilename(Filename);
|
||||||
MissingUnitname:=REVar(2);
|
MissingUnitname:=REVar(2);
|
||||||
UsedByUnit:='';
|
UsedByUnit:='';
|
||||||
if REMatches(Msg.Msg,'Can(''t| not) find unit ([a-z_.0-9]+) used by ([a-z_.0-9]+)','I')
|
if REMatches(Msg.Msg,'Can(''t| not) find unit ([a-z_.0-9]+) used by ([a-z_.0-9]+)','I')
|
||||||
@ -517,6 +518,8 @@ begin
|
|||||||
|
|
||||||
// load source
|
// load source
|
||||||
CodeBuf:=nil;
|
CodeBuf:=nil;
|
||||||
|
if (NewFilename='') and (FilenameIsAbsolute(Filename)) then
|
||||||
|
NewFilename:=Filename;
|
||||||
if NewFilename<>'' then begin
|
if NewFilename<>'' then begin
|
||||||
CodeBuf:=CodeToolBoss.LoadFile(NewFilename,false,false);
|
CodeBuf:=CodeToolBoss.LoadFile(NewFilename,false,false);
|
||||||
if CodeBuf=nil then begin
|
if CodeBuf=nil then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user