mirror of
https://github.com/moparisthebest/Simba
synced 2025-01-30 23:00:18 -05:00
OnFindInclude will also look in the script dir now.
This commit is contained in:
parent
c8166da3a1
commit
c12064bcb1
@ -42,8 +42,8 @@ uses
|
||||
SynEditMarkupHighAll, LMessages, Buttons,
|
||||
stringutil,mufasatypesutil,mufasabase,
|
||||
about, framefunctionlist, ocr, updateform, simbasettings, psextension, virtualextension,
|
||||
extensionmanager, settingssandbox, v_ideCodeInsight, v_ideCodeParser, CastaliaPasLexTypes,
|
||||
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump, uPSComponent;
|
||||
extensionmanager, settingssandbox, v_ideCodeInsight, CastaliaPasLexTypes,
|
||||
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
||||
|
||||
const
|
||||
SimbaVersion = 587;
|
||||
@ -471,7 +471,11 @@ function TForm1.OnCCFindInclude(Sender: TObject; var FileName: string): Boolean;
|
||||
var
|
||||
Temp : string;
|
||||
begin
|
||||
Temp := FindFile(filename,[MainDir+DS,IncludePath]);
|
||||
Temp := ExtractFileDir(CurrTab.ScriptFrame.ScriptFile);
|
||||
if (Temp <> '') then
|
||||
Temp := Temp + DS;
|
||||
|
||||
Temp := FindFile(filename,[MainDir+DS,IncludePath, Temp]);
|
||||
if temp <> '' then
|
||||
begin;
|
||||
filename := temp;
|
||||
|
@ -119,7 +119,7 @@ begin;
|
||||
else
|
||||
begin
|
||||
for i := 0 to high(Dirs) do
|
||||
if DirectoryExists(dirs[i]) then
|
||||
if (Dirs[i] <> '') and DirectoryExists(dirs[i]) then
|
||||
if fileexists(dirs[i] + filename) then
|
||||
begin
|
||||
result := dirs[i] + filename;
|
||||
|
Loading…
Reference in New Issue
Block a user