Browse Source

* attempt to fix web bug #1730

pierre 24 years ago
parent
commit
8d90e415dc
1 changed files with 14 additions and 7 deletions
  1. 14 7
      ide/fpviews.pas

+ 14 - 7
ide/fpviews.pas

@@ -1080,22 +1080,26 @@ end;
                                SourceEditor
                                SourceEditor
 *****************************************************************************}
 *****************************************************************************}
 
 
-function SearchCoreForFileName(const AFileName: string): PCodeEditorCore;
+function SearchCoreForFileName(AFileName: string): PCodeEditorCore;
 var EC: PCodeEditorCore;
 var EC: PCodeEditorCore;
 function Check(P: PView): boolean; {$ifndef FPC}far;{$endif}
 function Check(P: PView): boolean; {$ifndef FPC}far;{$endif}
 var OK: boolean;
 var OK: boolean;
 begin
 begin
   OK:=P^.HelpCtx=hcSourceWindow;
   OK:=P^.HelpCtx=hcSourceWindow;
   if OK then
   if OK then
-  with PSourceWindow(P)^ do
-  if CompareText(Editor^.FileName,AFileName)=0 then
-  begin
-    EC:=Editor^.Core;
-  end;
+    with PSourceWindow(P)^ do
+     if FixFileName(Editor^.FileName)=AFileName then
+       begin
+         EC:=Editor^.Core;
+         OK:=true;
+       end
+     else
+       OK:=false;
   Check:=OK;
   Check:=OK;
 end;
 end;
 begin
 begin
   EC:=nil;
   EC:=nil;
+  AFileName:=FixFileName(AFileName);
   { do not use the same core for all new files }
   { do not use the same core for all new files }
   if AFileName<>'' then
   if AFileName<>'' then
     Desktop^.FirstThat(@Check);
     Desktop^.FirstThat(@Check);
@@ -4199,7 +4203,10 @@ end;
 END.
 END.
 {
 {
   $Log$
   $Log$
-  Revision 1.10  2001-11-07 00:28:53  pierre
+  Revision 1.11  2001-12-19 10:59:18  pierre
+   * attempt to fix web bug 1730
+
+  Revision 1.10  2001/11/07 00:28:53  pierre
    + Disassembly window made public
    + Disassembly window made public
 
 
   Revision 1.9  2001/10/11 23:45:28  pierre
   Revision 1.9  2001/10/11 23:45:28  pierre