From 95827bfb41a63da1f8379b302b65364477f4f64b Mon Sep 17 00:00:00 2001 From: mattias Date: Thu, 24 Jan 2013 12:49:55 +0000 Subject: [PATCH] IDE: improve msg cant find unit: fixed loading unit if msg is showing the right unit git-svn-id: trunk@39951 - --- ide/msgquickfixes.pas | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ide/msgquickfixes.pas b/ide/msgquickfixes.pas index ff81733fa1..07c5e2c209 100644 --- a/ide/msgquickfixes.pas +++ b/ide/msgquickfixes.pas @@ -474,6 +474,7 @@ begin if Dir='' then exit; Msg.GetSourcePosition(Filename,Line,Col); + Filename:=TrimFilename(Filename); MissingUnitname:=REVar(2); UsedByUnit:=''; 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 CodeBuf:=nil; + if (NewFilename='') and (FilenameIsAbsolute(Filename)) then + NewFilename:=Filename; if NewFilename<>'' then begin CodeBuf:=CodeToolBoss.LoadFile(NewFilename,false,false); if CodeBuf=nil then begin