mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-17 08:09:26 +02:00
fixed searching units first lowercase
git-svn-id: trunk@5879 -
This commit is contained in:
parent
c76d013e4e
commit
f7390aea11
@ -1225,6 +1225,7 @@ var
|
||||
APath:=ADir;
|
||||
if (APath<>'') and (APath[length(APath)]<>PathDelim) then
|
||||
APath:=APath+PathDelim;
|
||||
// search as FPC: first lowercase, then keeping case, then uppercase
|
||||
if SearchSource then begin
|
||||
{$IFNDEF win32}
|
||||
if LoadFile(ADir+lowercase(AnUnitName)+'.pp',Result) then exit;
|
||||
@ -1232,11 +1233,18 @@ var
|
||||
{$ENDIF}
|
||||
if LoadFile(ADir+AnUnitName+'.pp',Result) then exit;
|
||||
if LoadFile(ADir+AnUnitName+'.pas',Result) then exit;
|
||||
{$IFNDEF win32}
|
||||
if LoadFile(ADir+UpperCaseStr(AnUnitName)+'.pp',Result) then exit;
|
||||
if LoadFile(ADir+UpperCaseStr(AnUnitName)+'.pas',Result) then exit;
|
||||
{$ENDIF}
|
||||
end else begin
|
||||
{$IFNDEF win32}
|
||||
if LoadFile(ADir+lowercase(AnUnitName)+CompiledSrcExt,Result) then exit;
|
||||
{$ENDIF}
|
||||
if LoadFile(ADir+AnUnitName+CompiledSrcExt,Result) then exit;
|
||||
{$IFNDEF win32}
|
||||
if LoadFile(ADir+UpperCaseStr(AnUnitName)+CompiledSrcExt,Result) then exit;
|
||||
{$ENDIF}
|
||||
end;
|
||||
Result:=nil;
|
||||
end;
|
||||
|
@ -5067,9 +5067,10 @@ var ActiveSrcEdit: TSourceEditor;
|
||||
+CurPath;
|
||||
end;
|
||||
for c:=0 to 2 do begin
|
||||
// FPC searches first lowercase, then keeping case, then uppercase
|
||||
case c of
|
||||
0: TempFile:=FName;
|
||||
1: TempFile:=LowerCase(FName);
|
||||
0: TempFile:=LowerCase(FName);
|
||||
1: TempFile:=FName;
|
||||
2: TempFile:=UpperCase(FName);
|
||||
end;
|
||||
if ExtractFileExt(TempFile)='' then begin
|
||||
@ -10607,6 +10608,9 @@ end.
|
||||
|
||||
{ =============================================================================
|
||||
$Log$
|
||||
Revision 1.762 2004/08/29 08:59:37 mattias
|
||||
fixed searching units first lowercase
|
||||
|
||||
Revision 1.761 2004/08/29 08:54:39 mattias
|
||||
fixed aborting new project
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user