diff --git a/editor/studio/AMXX_Studio.dof b/editor/studio/AMXX_Studio.dof index f9237f26..050e4b7f 100755 --- a/editor/studio/AMXX_Studio.dof +++ b/editor/studio/AMXX_Studio.dof @@ -115,7 +115,7 @@ AutoIncBuild=1 MajorVer=1 MinorVer=3 Release=0 -Build=28 +Build=29 Debug=0 PreRelease=0 Special=0 @@ -126,7 +126,7 @@ CodePage=1252 [Version Info Keys] CompanyName=AMX Mod X Dev Team FileDescription= -FileVersion=1.3.0.28 +FileVersion=1.3.0.29 InternalName= LegalCopyright= LegalTrademarks= diff --git a/editor/studio/AMXX_Studio.exe b/editor/studio/AMXX_Studio.exe index addcb2fa..cee6b2c9 100755 Binary files a/editor/studio/AMXX_Studio.exe and b/editor/studio/AMXX_Studio.exe differ diff --git a/editor/studio/AMXX_Studio.res b/editor/studio/AMXX_Studio.res index 6d852288..77dbece6 100755 Binary files a/editor/studio/AMXX_Studio.res and b/editor/studio/AMXX_Studio.res differ diff --git a/editor/studio/UnitCodeUtils.pas b/editor/studio/UnitCodeUtils.pas index f67aa00b..718b0481 100755 --- a/editor/studio/UnitCodeUtils.pas +++ b/editor/studio/UnitCodeUtils.pas @@ -143,6 +143,7 @@ begin frmMain.pbLoading.Position := i; SetProgressStatus('Indenting Code...'); eStr[i] := RemoveStringsAndComments(eStr[i], True, True); + eStr[i] := LowerCase(Trim(eStr[i])); end; for i := 0 to eStr.Count -1 do begin @@ -173,15 +174,8 @@ begin eTempIndent := eTempIndent +1; end; end - else if (IsAtStart('else', eStr[i], False)) and (Pos('{', eStr[i]) = 0) then begin - eString := eStr[i]; - Delete(eString, 1, 4); - if eString[1] <> Trim(eString)[1] then begin - eString := Trim(eString); - if GetMatchingBrace(eString) = Length(eString) then - eTempIndent := eTempIndent +1; - end; - end + else if (eStr[i] = 'else') or (Pos('else if', eStr[i]) = 1) and (Pos('{', eStr[i]) = 0) then + eTempIndent := eTempIndent +1 else if (Pos('{', eStr[i]) = 0) and (Length(eStr[i]) > 6) then begin if (IsAtStart('stock', eStr[i], False)) or (IsAtStart('while', eStr[i], True)) then begin eString := eStr[i]; diff --git a/editor/studio/UnitTextAnalyze.pas b/editor/studio/UnitTextAnalyze.pas index a68500cd..c6a32768 100755 --- a/editor/studio/UnitTextAnalyze.pas +++ b/editor/studio/UnitTextAnalyze.pas @@ -44,7 +44,7 @@ begin Result := ExtractFilePath(frmSettings.txtPawnCompilerPath.Text) + eInput + '.inc' else if FileExists(ExtractFilePath(frmSettings.txtPawnCompilerPath.Text) + 'include\' + eInput + '.inc') then Result := ExtractFilePath(frmSettings.txtPawnCompilerPath.Text) + 'include\' + eInput + '.inc' - else if (FileExists(ExtractFilePath(ActiveDoc.FileName) + eInput + '.inc')) and (not ActiveDoc.Modified) then + else if (FileExists(ExtractFilePath(ActiveDoc.FileName) + eInput + '.inc')) then Result := ExtractFilePath(ActiveDoc.FileName) + eInput + '.inc' else Result := ''; @@ -75,21 +75,20 @@ begin for i := 0 to eCode.Count - 1 do begin if (Application.Terminated) or (not Started) or (frmMain.pnlLoading.Visible) or (not frmMain.trvExplorer.Visible) then exit; - if Pos('get_user_button', eCode[i]) <> 0 then - eCActive := eCActive; + eBackup := Trim(eCode[i]); eString := RemoveStringsAndComments(Trim(eCode[i]), True, True); - if (Pos('/*', eString) = 1) or (Pos('*/', eString) <> 0) then begin - eCActive := (Pos('/*', eString) = 1); - if Pos('*/', eString) < Pos('/*', eString) then - continue - else + if (Pos('/*', eBackup) = 1) or (Pos('*/', eBackup) <> 0) then begin + eCActive := (Pos('/*', eBackup) = 1); + if (eCActive) and (Pos('*/', eBackup) <> 0) then begin eCActive := False; + continue + end; end; - if eCActive then + if (eBackup = '') or (Pos('//', eBackup) = 1) or (eCActive) then continue; - - eBackup := Trim(eCode[i]); + + eProcedureAdded := False; Inc(eTimeToSleep, 1);