mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
Update SynEdit component code, to get different interpretations of double minus comments for #549
This commit is contained in:
@@ -1,46 +1,48 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{D7950D4A-962A-4E8F-982E-E7E052259FA8}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Projects Include="SynEdit_R.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="SynEdit_D.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality</Borland.Personality>
|
||||
<Borland.ProjectType />
|
||||
<BorlandProject>
|
||||
<BorlandProject xmlns=""> <Default.Personality> </Default.Personality> </BorlandProject></BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="SynEdit_R">
|
||||
<MSBuild Projects="SynEdit_R.dproj" />
|
||||
</Target>
|
||||
<Target Name="SynEdit_R:Clean">
|
||||
<MSBuild Targets="Clean" Projects="SynEdit_R.dproj" />
|
||||
</Target>
|
||||
<Target Name="SynEdit_R:Make">
|
||||
<MSBuild Targets="Make" Projects="SynEdit_R.dproj" />
|
||||
</Target>
|
||||
<Target Name="SynEdit_D">
|
||||
<MSBuild Projects="SynEdit_D.dproj" />
|
||||
</Target>
|
||||
<Target Name="SynEdit_D:Clean">
|
||||
<MSBuild Targets="Clean" Projects="SynEdit_D.dproj" />
|
||||
</Target>
|
||||
<Target Name="SynEdit_D:Make">
|
||||
<MSBuild Targets="Make" Projects="SynEdit_D.dproj" />
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="SynEdit_R;SynEdit_D" />
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="SynEdit_R:Clean;SynEdit_D:Clean" />
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="SynEdit_R:Make;SynEdit_D:Make" />
|
||||
</Target>
|
||||
</Project>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{D7950D4A-962A-4E8F-982E-E7E052259FA8}</ProjectGuid>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Projects Include="SynEdit_R.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
<Projects Include="SynEdit_D.dproj">
|
||||
<Dependencies/>
|
||||
</Projects>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Default.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType/>
|
||||
<BorlandProject>
|
||||
<Default.Personality/>
|
||||
</BorlandProject>
|
||||
</ProjectExtensions>
|
||||
<Target Name="SynEdit_R">
|
||||
<MSBuild Projects="SynEdit_R.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEdit_R:Clean">
|
||||
<MSBuild Projects="SynEdit_R.dproj" Targets="Clean"/>
|
||||
</Target>
|
||||
<Target Name="SynEdit_R:Make">
|
||||
<MSBuild Projects="SynEdit_R.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<Target Name="SynEdit_D">
|
||||
<MSBuild Projects="SynEdit_D.dproj"/>
|
||||
</Target>
|
||||
<Target Name="SynEdit_D:Clean">
|
||||
<MSBuild Projects="SynEdit_D.dproj" Targets="Clean"/>
|
||||
</Target>
|
||||
<Target Name="SynEdit_D:Make">
|
||||
<MSBuild Projects="SynEdit_D.dproj" Targets="Make"/>
|
||||
</Target>
|
||||
<Target Name="Build">
|
||||
<CallTarget Targets="SynEdit_R;SynEdit_D"/>
|
||||
</Target>
|
||||
<Target Name="Clean">
|
||||
<CallTarget Targets="SynEdit_R:Clean;SynEdit_D:Clean"/>
|
||||
</Target>
|
||||
<Target Name="Make">
|
||||
<CallTarget Targets="SynEdit_R:Make;SynEdit_D:Make"/>
|
||||
</Target>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Group.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Group.Targets')"/>
|
||||
</Project>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Package</AppType>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>18.6</ProjectVersion>
|
||||
<ProjectVersion>18.8</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
@@ -18,11 +18,6 @@
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
@@ -40,6 +35,7 @@
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<SanitizedProjectName>SynEdit_D</SanitizedProjectName>
|
||||
<DCC_DcuOutput>..\..\build\$(Platform)</DCC_DcuOutput>
|
||||
<DesignOnlyPackage>true</DesignOnlyPackage>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
@@ -55,14 +51,12 @@
|
||||
<VerInfo_Locale>1031</VerInfo_Locale>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_F>false</DCC_F>
|
||||
<SanitizedProjectName>SynEdit_D</SanitizedProjectName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_UsePackage>SynEdit_R;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_UsePackage>SynEdit_R;$(DCC_UsePackage)</DCC_UsePackage>
|
||||
@@ -72,7 +66,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<TargetedPlatforms>3</TargetedPlatforms>
|
||||
<AppType>Package</AppType>
|
||||
<FrameworkType>VCL</FrameworkType>
|
||||
<ProjectVersion>18.6</ProjectVersion>
|
||||
<ProjectVersion>18.8</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
@@ -40,6 +40,7 @@
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<SanitizedProjectName>SynEdit_R</SanitizedProjectName>
|
||||
<DCC_DcuOutput>..\..\build\$(Platform)</DCC_DcuOutput>
|
||||
<DCC_OutputNeverBuildDcps>true</DCC_OutputNeverBuildDcps>
|
||||
<RuntimeOnlyPackage>true</RuntimeOnlyPackage>
|
||||
@@ -56,13 +57,11 @@
|
||||
<VerInfo_Locale>1031</VerInfo_Locale>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_E>false</DCC_E>
|
||||
<SanitizedProjectName>SynEdit_R</SanitizedProjectName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_Namespace>Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
@@ -71,7 +70,7 @@
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_DebugInformation>0</DCC_DebugInformation>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1795,7 +1795,7 @@ var
|
||||
CompareString := StripFormatCommands(CompareString);
|
||||
end;
|
||||
|
||||
if fMatchTextAnywhere then
|
||||
if FMatchTextAnywhere then
|
||||
begin
|
||||
if Value <> '' then
|
||||
begin
|
||||
@@ -1851,11 +1851,11 @@ begin
|
||||
Exit;
|
||||
if FMatchText then
|
||||
begin
|
||||
if fMatchTextAnywhere then
|
||||
if FMatchTextAnywhere then
|
||||
Position := 0;
|
||||
RecalcList;
|
||||
AdjustScrollBarPosition;
|
||||
if not fMatchTextAnywhere then
|
||||
if not FMatchTextAnywhere then
|
||||
Position := 0;
|
||||
|
||||
if Visible and Assigned(FOnChangePosition) and (DisplayType = ctCode) then
|
||||
@@ -2798,6 +2798,7 @@ begin
|
||||
Form.UsePrettyText := scoUsePrettyText in Value;
|
||||
Form.UseInsertList := scoUseInsertList in Value;
|
||||
Form.MatchText := scoLimitToMatchedText in Value;
|
||||
Form.MatchTextAnywhere := scoLimitToMatchedTextAnywhere in Value;
|
||||
Form.CompleteWithTab := scoCompleteWithTab in Value;
|
||||
Form.CompleteWithEnter := scoCompleteWithEnter in Value;
|
||||
end;
|
||||
|
||||
@@ -12,7 +12,7 @@ The Original Code is: SynDBEdit.pas, released 2000-05-05.
|
||||
The Original Code is based on DBmwEdit.pas by Vladimir Kuznetsov, part of
|
||||
the mwEdit component suite.
|
||||
Portions created by Vladimir Kuznetsov are Copyright (C) 1999 Vladimir Kuznetsov.
|
||||
Unicode translation by Ma<EFBFBD>l H<EFBFBD>rz.
|
||||
Unicode translation by Maël Hörz.
|
||||
All Rights Reserved.
|
||||
|
||||
Contributors to the SynEdit and mwEdit projects are listed in the
|
||||
@@ -320,6 +320,10 @@ begin
|
||||
end;
|
||||
|
||||
procedure TCustomDBSynEdit.LoadMemo;
|
||||
{$IFDEF UNICODE}
|
||||
const
|
||||
BlobFieldWideText = [ftWideMemo,ftWideString];
|
||||
{$ENDIF}
|
||||
{$IFDEF SYN_COMPILER_3_UP}
|
||||
var
|
||||
BlobStream: TStream;
|
||||
@@ -337,19 +341,30 @@ begin
|
||||
BlobStream := TBlobStream.Create(BlobField, bmRead);
|
||||
{$ENDIF}
|
||||
Lines.BeginUpdate;
|
||||
Lines.LoadFromStream(BlobStream{$IFDEF UNICODE}, TEncoding.Default{$ENDIF});
|
||||
{$IFDEF UNICODE}
|
||||
//03.12.2019 fix for unicode
|
||||
//Tested on UTF8 TEXT Sqlite3 & Zeos Unicode (UTF16) v7.2.6
|
||||
//For UTF8 use: System.SysUtils.TEncoding.UTF8
|
||||
if ((FDataLink.Field is TBlobField) and
|
||||
(TBlobField(FDataLink.Field).BlobType in BlobFieldWideText)) then
|
||||
Lines.LoadFromStream(BlobStream, TEncoding.Unicode)
|
||||
else Lines.LoadFromStream(BlobStream, TEncoding.Default);
|
||||
{$ELSE} //Non Unicode
|
||||
Lines.LoadFromStream(BlobStream);
|
||||
{$ENDIF}
|
||||
Lines.EndUpdate;
|
||||
BlobStream.Free;
|
||||
Modified := False;
|
||||
ClearUndo;
|
||||
except
|
||||
// Memo too large
|
||||
// Memo too large
|
||||
on E: EInvalidOperation do
|
||||
Lines.Text := Format('(%s)', [E.Message]);
|
||||
end;
|
||||
EditingChange(Self);
|
||||
end;
|
||||
|
||||
|
||||
procedure TCustomDBSynEdit.DoChange;
|
||||
begin
|
||||
FDataLink.Modified;
|
||||
|
||||
@@ -3953,7 +3953,9 @@ begin
|
||||
else
|
||||
vStartOfBlock := CaretXY;
|
||||
|
||||
Inc(FPaintTransientLock);
|
||||
SetSelTextPrimitiveEx(PasteMode, PWideChar(GetClipboardText), True);
|
||||
Dec(FPaintTransientLock);
|
||||
vEndOfBlock := BlockEnd;
|
||||
if PasteMode = smNormal then
|
||||
FUndoList.AddChange(crPaste, vStartOfBlock, vEndOfBlock, SelText,
|
||||
@@ -8828,6 +8830,7 @@ begin
|
||||
end
|
||||
else
|
||||
bEndUndoBlock := False;
|
||||
Inc(FPaintTransientLock);
|
||||
try
|
||||
while (ptCurrent.Line >= ptStart.Line) and (ptCurrent.Line <= ptEnd.Line) do
|
||||
begin
|
||||
@@ -8917,6 +8920,7 @@ begin
|
||||
finally
|
||||
if bReplaceAll and not bPrompt then DecPaintLock;
|
||||
if bEndUndoBlock then EndUndoBlock;
|
||||
Dec(FPaintTransientLock);
|
||||
DoOnPaintTransient( ttAfter );
|
||||
end;
|
||||
end;
|
||||
|
||||
@@ -80,8 +80,9 @@ type
|
||||
OldStyle: Boolean): Boolean; virtual;
|
||||
function LoadFromRegistry(Reg: TBetterRegistry): Boolean;
|
||||
function SaveToRegistry(Reg: TBetterRegistry): Boolean;
|
||||
function LoadFromFile(Ini: TIniFile): Boolean;
|
||||
function SaveToFile(Ini: TIniFile): Boolean;
|
||||
//Fix type changed to TCustomIniFile for use both TMemIniFile and TIniFile
|
||||
function LoadFromFile(Ini: TCustomIniFile): Boolean;
|
||||
function SaveToFile(Ini: TCustomIniFile): Boolean;
|
||||
public
|
||||
procedure SetColors(Foreground, Background: TColor);
|
||||
property FriendlyName: UnicodeString read FFriendlyName;
|
||||
@@ -704,7 +705,7 @@ begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function TSynHighlighterAttributes.LoadFromFile(Ini : TIniFile): Boolean;
|
||||
function TSynHighlighterAttributes.LoadFromFile(Ini : TCustomIniFile): boolean;
|
||||
var
|
||||
S: TStringList;
|
||||
begin
|
||||
@@ -728,7 +729,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TSynHighlighterAttributes.SaveToFile(Ini : TIniFile): Boolean;
|
||||
function TSynHighlighterAttributes.SaveToFile(Ini : TCustomIniFile): boolean;
|
||||
begin
|
||||
Ini.WriteInteger(Name, 'Background', Background);
|
||||
Ini.WriteInteger(Name, 'Foreground', Foreground);
|
||||
|
||||
@@ -64,7 +64,7 @@ type
|
||||
|
||||
TRangeState = (rsANil, rsAnsi, rsAnsiAsm, rsAsm, rsBor, rsBorAsm, rsProperty,
|
||||
rsExports, rsDirective, rsDirectiveAsm, rsHereDocSingle, rsHereDocDouble,
|
||||
rsType, rsUnknown);
|
||||
rsType, rsUnit, rsUnknown);
|
||||
|
||||
PIdentFuncTableFunc = ^TIdentFuncTableFunc;
|
||||
TIdentFuncTableFunc = function : TtkTokenKind of object;
|
||||
@@ -86,6 +86,7 @@ type
|
||||
FCommentClose : Char;
|
||||
FIdentFuncTable: array[0..388] of TIdentFuncTableFunc;
|
||||
FKeywords: TAnsiStringList;
|
||||
FKeywordsUnitScoped: TAnsiStringList;
|
||||
FKeywordsPropertyScoped: TAnsiStringList;
|
||||
FKeywordsTypeScoped: TAnsiStringList;
|
||||
FTokenID: TtkTokenKind;
|
||||
@@ -110,6 +111,8 @@ type
|
||||
function KeywordFunc: TtkTokenKind;
|
||||
function FuncAsm: TtkTokenKind;
|
||||
function FuncEnd: TtkTokenKind;
|
||||
function FuncUnitScoped: TtkTokenKind;
|
||||
function FuncUnit: TtkTokenKind;
|
||||
function FuncPropertyScoped: TtkTokenKind;
|
||||
function FuncProperty: TtkTokenKind;
|
||||
function FuncTypeScoped: TtkTokenKind;
|
||||
@@ -209,7 +212,7 @@ uses
|
||||
|
||||
const
|
||||
// if the language is case-insensitive keywords *must* be in lowercase
|
||||
cKeywords: array[1..95] of UnicodeString = (
|
||||
cKeywords: array[1..94] of UnicodeString = (
|
||||
'abstract', 'and', 'array', 'as', 'asm',
|
||||
'begin', 'break', 'case', 'cdecl', 'class', 'const', 'constructor',
|
||||
'continue', 'deprecated', 'destructor',
|
||||
@@ -223,8 +226,11 @@ const
|
||||
'procedure', 'program', 'property', 'protected', 'public', 'published',
|
||||
'raise', 'record', 'register', 'reintroduce', 'repeat', 'require',
|
||||
'resourcestring', 'sar', 'sealed', 'set', 'shl', 'shr', 'static',
|
||||
'step', 'strict', 'then', 'to', 'try', 'type', 'unit', 'until', 'uses',
|
||||
'var', 'virtual', 'while', 'xor'
|
||||
'strict', 'then', 'to', 'try', 'type', 'unit', 'until', 'uses', 'var',
|
||||
'virtual', 'while', 'xor'
|
||||
);
|
||||
cKeywordsUnitScoped: array [0..0] of UnicodeString = (
|
||||
'namespace'
|
||||
);
|
||||
cKeywordsPropertyScoped: array [0..4] of UnicodeString = (
|
||||
'default', 'index', 'read', 'stored', 'write'
|
||||
@@ -296,6 +302,7 @@ begin
|
||||
SetAttributesOnChange(DefHighlightChange);
|
||||
|
||||
FKeywords := TAnsiStringList.Create;
|
||||
FKeywordsUnitScoped := TAnsiStringList.Create;
|
||||
FKeywordsPropertyScoped := TAnsiStringList.Create;
|
||||
FKeywordsTypeScoped := TAnsiStringList.Create;
|
||||
|
||||
@@ -325,6 +332,7 @@ destructor TSynDWSSyn.Destroy;
|
||||
begin
|
||||
inherited;
|
||||
FKeywords.Free;
|
||||
FKeywordsUnitScoped.Free;
|
||||
FKeywordsPropertyScoped.Free;
|
||||
FKeywordsTypeScoped.Free;
|
||||
{$IFDEF SYN_CodeFolding}
|
||||
@@ -378,6 +386,12 @@ begin
|
||||
SetIdentFunc(HashKey(@cKeywords[i][1]), KeywordFunc);
|
||||
FKeywords.Add(cKeywords[i]);
|
||||
end;
|
||||
|
||||
for i := 0 to High(cKeywordsUnitScoped) do
|
||||
begin
|
||||
SetIdentFunc(HashKey(@cKeywordsUnitScoped[i][1]), FuncUnitScoped);
|
||||
FKeywordsUnitScoped.Add(cKeywordsUnitScoped[i]);
|
||||
end;
|
||||
|
||||
for i := 0 to High(cKeywordsPropertyScoped) do
|
||||
begin
|
||||
@@ -398,6 +412,7 @@ begin
|
||||
SetIdentFunc(HashKey('asm'), FuncAsm);
|
||||
SetIdentFunc(HashKey('end'), FuncEnd);
|
||||
SetIdentFunc(HashKey('property'), FuncProperty);
|
||||
SetIdentFunc(HashKey('unit'), FuncUnit);
|
||||
SetIdentFunc(HashKey('type'), FuncType);
|
||||
|
||||
FKeywords.Sorted := True;
|
||||
@@ -476,6 +491,17 @@ begin
|
||||
Result := KeywordFunc;
|
||||
end;
|
||||
|
||||
function TSynDWSSyn.FuncUnitScoped: TtkTokenKind;
|
||||
var
|
||||
buf: String;
|
||||
begin
|
||||
SetString(buf, FToIdent, FStringLen);
|
||||
if (FRange = rsUnit) and (FKeywordsUnitScoped.IndexOf(buf) >= 0) then
|
||||
Result := tkKey
|
||||
else
|
||||
Result := KeywordFunc;
|
||||
end;
|
||||
|
||||
function TSynDWSSyn.FuncProperty: TtkTokenKind;
|
||||
begin
|
||||
if IsCurrentToken('property') then
|
||||
@@ -487,6 +513,17 @@ begin
|
||||
Result := KeywordFunc;
|
||||
end;
|
||||
|
||||
function TSynDWSSyn.FuncUnit: TtkTokenKind;
|
||||
begin
|
||||
if IsCurrentToken('unit') then
|
||||
begin
|
||||
Result := tkKey;
|
||||
FRange := rsUnit;
|
||||
end
|
||||
else
|
||||
Result := KeywordFunc;
|
||||
end;
|
||||
|
||||
procedure TSynDWSSyn.AddressOpProc;
|
||||
begin
|
||||
FTokenID := tkSymbol;
|
||||
@@ -771,7 +808,7 @@ procedure TSynDWSSyn.SemicolonProc;
|
||||
begin
|
||||
Inc(Run);
|
||||
FTokenID := tkSymbol;
|
||||
if FRange in [rsProperty, rsExports] then
|
||||
if FRange in [rsUnit, rsProperty, rsExports] then
|
||||
FRange := rsUnknown;
|
||||
end;
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ type
|
||||
xtkSquareOpen, xtkStar, xtkSubtract, xtkSubtractAssign, xtkXor,
|
||||
xtkXorAssign);
|
||||
|
||||
TRangeState = (rsUnknown, rsDirective, rsDirectiveComment,
|
||||
TRangeState = (rsUnknown, rsAnsiC, rsDirective, rsDirectiveComment,
|
||||
rsMultiLineString, rsMultiLineDirective);
|
||||
|
||||
PIdentFuncTableFunc = ^TIdentFuncTableFunc;
|
||||
@@ -590,6 +590,7 @@ begin
|
||||
|
||||
FCommentAttri := TSynHighlighterAttributes.Create(SYNS_AttrComment, SYNS_FriendlyAttrComment);
|
||||
FCommentAttri.Style:= [fsItalic];
|
||||
FCommentAttri.Foreground := clGray;
|
||||
FIdentifierAttri := TSynHighlighterAttributes.Create(SYNS_AttrIdentifier, SYNS_FriendlyAttrIdentifier);
|
||||
FInterfaceQualifierAttri := TSynHighlighterAttributes.Create(SYNS_AttrInterfaceQualifier, SYNS_FriendlyAttrInterfaceQualifier);
|
||||
FInterfaceQualifierAttri.Style:= [fsBold];
|
||||
@@ -1277,6 +1278,8 @@ begin
|
||||
'*': {c style comments}
|
||||
begin
|
||||
FTokenID := tkComment;
|
||||
if FRange <> rsDirectiveComment then
|
||||
FRange := rsAnsiC;
|
||||
Inc(Run, 2);
|
||||
while FLine[Run] <> #0 do
|
||||
case FLine[Run] of
|
||||
@@ -1291,7 +1294,11 @@ begin
|
||||
Break;
|
||||
end else Inc(Run);
|
||||
#10, #13:
|
||||
Break;
|
||||
begin
|
||||
if FRange = rsDirectiveComment then
|
||||
FRange := rsAnsiC;
|
||||
Break;
|
||||
end;
|
||||
else Inc(Run);
|
||||
end;
|
||||
end;
|
||||
@@ -1453,7 +1460,7 @@ begin
|
||||
FAsmStart := False;
|
||||
FTokenPos := Run;
|
||||
case FRange of
|
||||
rsDirectiveComment: AnsiCProc;
|
||||
rsAnsiC, rsDirectiveComment: AnsiCProc;
|
||||
rsMultiLineDirective: DirectiveEndProc;
|
||||
rsMultilineString: StringEndProc;
|
||||
else
|
||||
|
||||
@@ -1243,7 +1243,7 @@ begin
|
||||
FoldRanges.StartFoldRange(Line +1, FT_Implementation)
|
||||
// Functions and procedures
|
||||
else if RE_Code.Exec(CurLine) then
|
||||
FoldRanges.StartFoldRange(Line +1, FT_CodeDeclaration)
|
||||
FoldRanges.StartFoldRange(Line + 1, FT_CodeDeclaration)
|
||||
// Find begin or end (Fold Type 1)
|
||||
else if not BlockDelimiter(Line) then
|
||||
FoldRanges.NoFoldInfo(Line + 1);
|
||||
@@ -1346,7 +1346,7 @@ procedure TSynPasSyn.EnumUserSettings(DelphiVersions: TStrings);
|
||||
Versions: TStringList;
|
||||
i: Integer;
|
||||
begin
|
||||
with TBetterRegistry.Create do
|
||||
with TBetterRegistry.Create(KEY_READ or KEY_WOW64_32KEY) do
|
||||
begin
|
||||
try
|
||||
RootKey := HKEY_LOCAL_MACHINE;
|
||||
@@ -1371,22 +1371,11 @@ procedure TSynPasSyn.EnumUserSettings(DelphiVersions: TStrings);
|
||||
end;
|
||||
end;
|
||||
|
||||
var
|
||||
LWowNode : string;
|
||||
begin
|
||||
{ returns the user settings that exist in the registry }
|
||||
// See UseUserSettings below where these strings are used
|
||||
{$ifdef WIN64}
|
||||
LWowNode := 'WOW6432Node\';
|
||||
{$else}
|
||||
LWowNode := '';
|
||||
{$ENDIF}
|
||||
|
||||
LoadKeyVersions('\SOFTWARE\'+ LWOWNode + 'Borland\Delphi', '');
|
||||
LoadKeyVersions('\SOFTWARE\'+ LWOWNode + 'Borland\BDS', BDSVersionPrefix);
|
||||
LoadKeyVersions('\SOFTWARE\'+ LWOWNode + 'CodeGear\BDS', BDSVersionPrefix);
|
||||
LoadKeyVersions('\SOFTWARE\'+ LWOWNode + 'Embarcadero\BDS', BDSVersionPrefix);
|
||||
|
||||
LoadKeyVersions('\SOFTWARE\Borland\Delphi', '');
|
||||
LoadKeyVersions('\SOFTWARE\Borland\BDS', BDSVersionPrefix);
|
||||
LoadKeyVersions('\SOFTWARE\CodeGear\BDS', BDSVersionPrefix);
|
||||
LoadKeyVersions('\SOFTWARE\Embarcadero\BDS', BDSVersionPrefix);
|
||||
end;
|
||||
|
||||
function TSynPasSyn.UseUserSettings(VersionIndex: Integer): Boolean;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{-------------------------------------------------------------------------------
|
||||
{-------------------------------------------------------------------------------
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.1 (the "License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
@@ -79,7 +79,7 @@ type
|
||||
TRangeState = (rsUnknown, rsComment, rsString, rsConditionalComment, rsConsoleOutput);
|
||||
|
||||
TSQLDialect = (sqlStandard, sqlInterbase6, sqlMSSQL7, sqlMySQL, sqlOracle,
|
||||
sqlSybase, sqlIngres, sqlMSSQL2K, sqlPostgres, sqlNexus);
|
||||
sqlSybase, sqlIngres, sqlMSSQL2K, sqlPostgres, sqlNexus, sqlInformix);
|
||||
|
||||
type
|
||||
TSynSQLSyn = class(TSynCustomHighlighter)
|
||||
@@ -1283,6 +1283,82 @@ const
|
||||
'AUTOINC,BIGINT,LARGEINT,WORD,DWORD,FLOAT,REAL,DOUBLE,EXTENDED,MONEY,' +
|
||||
'BOOLEAN,BOOL,DATE,TIME,TIMESTAMP,DATETIME,GUID,BYTEARRAY,RECREV';
|
||||
|
||||
//---Informix-------------------------------------------------------------------
|
||||
// keywords
|
||||
InformixKW: Unicodestring =
|
||||
'ABSOLUTE,ACCESS,ACCESS_METHOD,ACTIVE,ADD,AFTER,AGGREGATE,ALIGNMENT,ALL,' +
|
||||
'ALL_ROWS,ALLOCATE,ALTER,AND,ANSI,ANY,APPEND,AS,ASC,AT,ATTACH,AUDIT,' +
|
||||
'AUTHORIZATION,AUTO,AUTOFREE,AVOID_EXECUTE,AVOID_SUBQF,BEFORE,BEGIN,' +
|
||||
'BETWEEN,BINARY,BOTH,BUFFERED,BUILTIN,BY,CACHE,CANNOTHASH,CASCADE,CHECK,' +
|
||||
'CLASS,CLIENT,CLOSE,CLUSTER,CLUSTERSIZE,COARSE,COBOL,CODESET,COLLATION,' +
|
||||
'COLLECTION,COLUMN,COMMIT,COMMITTED,COMMUTATOR,CONCURRENT,CONNECT,' +
|
||||
'CONNECTION,CONST,CONSTRAINT,CONSTRAINTS,CONSTRUCTOR,COPY,COSTFUNC,' +
|
||||
'CRCOLS,CREATE,CROSS,CURRENT_ROLE,CURSOR,CYCLE,DATABASE,DATAFILES,' +
|
||||
'DATASKIP,DBA,DBDATE,DBPASSWORD,DEALLOCATE,DEBUG,DEC_T,DECLARE,DEFAULT,' +
|
||||
'DEFERRED,DEFERRED_PREPARE,DELAY,DELETE,DELIMITER,DELUXE,DEREF,DESC,' +
|
||||
'DESCRIBE,DESCRIPTOR,DETACH,DIAGNOSTICS,DIRECTIVES,DIRTY,DISABLED,' +
|
||||
'DISCONNECT,DISTINCT,DISTRIBUTEBINARY,DISTRIBUTESREFERENCES,' +
|
||||
'DISTRIBUTIONS,DOCUMENT,DOMAIN,DONOTDISTRIBUTE,DORMANT,DROP,DTIME_T,EACH,' +
|
||||
'ELIF,ELSE,ENABLED,ENCRYPTION,END,ENUM,ENVIRONMENT,ESCAPE,EXCLUSIVE,EXEC,' +
|
||||
'EXECUTE,EXECUTEANYWHERE,EXISTS,EXPLAIN,EXPLICIT,EXPRESS,EXPRESSION,' +
|
||||
'EXTENT,EXTERNAL,FALSE,FAR,FETCH,FILE,FILLFACTOR,FILTERING,FIRST,' +
|
||||
'FIRST_ROWS,FIXCHAR,FIXED,FLUSH,FOREIGN,FORMAT,FORTRAN,FOUND,FRACTION,' +
|
||||
'FRAGMENT,FREE,FROM,FULL,FUNCTION,GENERAL,GET,GK,GLOBAL,GO,GOTO,GRANT,' +
|
||||
'GROUP,HANDLESNULLS,HASH,HAVING,HIGH,HINT,HOLD,HOUR,HYBRID,IFX_INT8_T,' +
|
||||
'IFX_LO_CREATE_SPEC_T,IFX_LO_STAT_T,IMMEDIATE,IMPLICIT,IN,INACTIVE,' +
|
||||
'INCREMENT,INDEX,INDEXES,INDICATOR,INFORMIX,INIT,INLINE,INNER,INOUT,' +
|
||||
'INSERT,INSTEAD,INTEG,INTERNAL,INTERNALLENGTH,INTO,INTRVL_T,IS,' +
|
||||
'ISCANONICAL,ISOLATION,ITEM,ITERATOR,JOIN,KEEP,KEY,LABELEQ,LABELGE,' +
|
||||
'LABELGLB,LABELGT,LABELLE,LABELLT,LABELLUB,LABELTOSTRING,LANGUAGE,LAST,' +
|
||||
'LEADING,LEFT,LEVEL,LIKE,LIMIT,LISTING,LOAD,LOC_T,LOCAL,LOCATOR,LOCK,' +
|
||||
'LOCKS,LOG,LONG,LOW,MATCHES,MAXERRORS,MAXLEN,MAXVALUE,MEDIAN,MEDIUM,' +
|
||||
'MEMORY_RESIDENT,MIDDLE,MINUTE,MINVALUE,MODE,MODERATE,MODIFY,MODULE,' +
|
||||
'MOUNTING,NAME,NEGATOR,NEW,NEXT,NO,NOCACHE,NOCYCLE,NOMAXVALUE,NOMIGRATE,' +
|
||||
'NOMINVALUE,NON_RESIDENT,NONE,NOORDER,NORMAL,NOT,NOTEMPLATEARG,NULL,' +
|
||||
'OF,OFF,OLD,ONLINE,ONLY,OPAQUE,OPCLASS,OPEN,OPERATIONAL,OPTCOMPIND,' +
|
||||
'OPTICAL,OPTIMIZATION,OPTION,OR,ORDER,OUT,OUTER,OUTPUT,PAGE,' +
|
||||
'PARALLELIZABLE,PARAMETER,PARTITION,PASCAL,PASSEDBYVALUE,PASSWORD,' +
|
||||
'PDQPRIORITY,PERCALL_COST,PLI,PLOAD,PREPARE,PREVIOUS,PRIMARY,PRIOR,' +
|
||||
'PRIVATE,PRIVILEGES,PROCEDURE,PUBLIC,PUT,RAW,READ,RECORDEND,REF,' +
|
||||
'REFERENCES,REFERENCING,REGISTER,REJECTFILE,RELATIVE,RELEASE,REMAINDER,' +
|
||||
'RENAME,REOPTIMIZATION,REPEATABLE,REPLICATION,RESERVE,RESOLUTION,' +
|
||||
'RESOURCE,RESTART,RESTRICT,RESUME,RETAIN,RETURNING,RETURNS,REUSE,REVOKE,' +
|
||||
'RIGHT,ROBIN,ROLE,ROLLBACK,ROLLFORWARD,ROUTINE,ROWID,ROWIDS,ROWS,SAMEAS,' +
|
||||
'SAMPLES,SAVE,SCHEDULE,SCHEMA,SCRATCH,SCROLL,SECOND,SECONDARY,SECTION,' +
|
||||
'SELCONST,SELECT,SELFUNC,SEQUENCE,SERIALIZABLE,SERVERUUID,SESSION,SHARE,' +
|
||||
'SHORT,SIGNED,SIZE,SKALL,SKINHIBIT,SKIP,SKSHOW,SOME,SPECIFIC,SQL,SQLCODE,' +
|
||||
'SQLCONTEXT,SQLERROR,SQLSTATE,SQLWARNING,STABILITY,STACK,STANDARD,START,' +
|
||||
'STATIC,STATISTICS,STEP,STOP,STORAGE,STRATEGIES,STRING,STRINGTOLABEL,' +
|
||||
'STRUCT,STYLE,SUPPORT,SYNC,SYNONYM,TABLE,TEMP,TEMPLATE,TEST,TIME,TIMEOUT,' +
|
||||
'TO,TRAILING,TRANSACTION,TRIGGER,TRIGGERS,TRUE,TRUNCATE,TYPE,TYPEDEF,' +
|
||||
'TYPEID,TYPENAME,TYPEOF,UNCOMMITTED,UNDER,UNION,UNIQUE,UNKNOWN,UNLOAD,' +
|
||||
'UNLOCK,UNSIGNED,UPDATE,USAGE,USE_SUBQF,USING,VALUE,VALUES,VAR,VARIABLE,' +
|
||||
'VARIANT,VIEW,VIOLATIONS,VOID,VOLATILE,WAIT,WARNING,WHERE,WITH,WITHOUT,' +
|
||||
'WORK,WRITE,XADATASOURCE,XID,XLOAD,XUNLOAD';
|
||||
|
||||
// types
|
||||
InformixTypes: UnicodeString =
|
||||
'BLOB,BOOLEAN,BYTE,CHAR,CHARACTER,VARYING,CLOB,DATE,DATETIME,DEC,DECIMAL,' +
|
||||
'DOUBLE,PRECISION,FLOAT,INT,INT8,INTEGER,INTERVAL,LIST,LVARCHAR,MONEY,' +
|
||||
'MULTISET,NCHAR,NUMERIC,NVARCHAR,REAL,ROW,SERIAL,SERIAL8,SET,SMALLFLOAT,' +
|
||||
'SMALLINT,TEXT,VARCHAR';
|
||||
|
||||
// PLSQL keywords
|
||||
InformixPLSQLKW: UnicodeString =
|
||||
'CALL,CONTINUE,DEFINE,ERROR,EXCEPTION,EXIT,FOR,FOREACH,IF,LET,ON,RAISE,' +
|
||||
'RETURN,SYSTEM,TRACE,WHENEVER,WHILE';
|
||||
|
||||
// functions
|
||||
InformixFunctions: UnicodeString =
|
||||
'ABS,ACOS,ASIN,ATAN,ATAN2,AVG,CARDINALITY,CASE,CAST,CHARACTER_LENGTH,' +
|
||||
'CHAR_LENGTH,COS,COUNT,CURRENT,DAY,DBINFO,DBSERVERNAME,DECODE,' +
|
||||
'DECRYPT_CHAR,DECRYPT_BINARY,DEFAULT_ROLE,ENCRYPT_AES,ENCRYPT_TDES,EXP,' +
|
||||
'EXTEND,FILETOBLOB,FILETOCLOB,GETHINT,HEX,IFX_ALLOW_NEWLINE,' +
|
||||
'IFX_REPLACE_MODULE,INITCAP,LENGTH,LOCOPY,LOGN,LOG10,LOTOFILE,LOWER,LPAD,' +
|
||||
'MAX,MDY,MIN,MOD,MONTH,NVL,OCTET_LENGTH,POW,RANGE,REPLACE,ROOT,ROUND,' +
|
||||
'RPAD,SIN,SITENAME,SQRT,STDEV,SUBSTR,SUBSTRING,SUM,TAN,THEN,TO_CHAR,TO_DATE,' +
|
||||
'TODAY,TRIM,TRUNC,UNITS,UPPER,USER,VARIANCE,WEEKDAY,WHEN,YEAR';
|
||||
|
||||
function TSynSQLSyn.HashKey(Str: PWideChar): Integer;
|
||||
var
|
||||
FoundDoubleMinus: Boolean;
|
||||
@@ -1567,7 +1643,7 @@ end;
|
||||
procedure TSynSQLSyn.MinusProc;
|
||||
begin
|
||||
Inc(Run);
|
||||
if FLine[Run] = '-' then
|
||||
if (FLine[Run] = '-') and ((FDialect <> sqlMySQL) or (FLine[Run+1] = ' ')) then
|
||||
begin
|
||||
FTokenID := tkComment;
|
||||
repeat
|
||||
@@ -2317,6 +2393,12 @@ begin
|
||||
tkDatatype: Result := NexusTypes;
|
||||
tkFunction: Result := NexusFunctions;
|
||||
end;
|
||||
sqlInformix:
|
||||
case TtkTokenKind(TokenKind) of
|
||||
tkKey: Result := InformixKW;
|
||||
tkDatatype: Result := InformixTypes;
|
||||
tkFunction: Result := InformixFunctions;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ uses
|
||||
SynEditHighlighter,
|
||||
SynUnicode,
|
||||
SysUtils,
|
||||
{$IFDEF SYN_CodeFolding}
|
||||
SynEditCodeFolding,
|
||||
{$ENDIF}
|
||||
Classes;
|
||||
|
||||
type
|
||||
@@ -90,7 +93,11 @@ type
|
||||
rsDocTypeQuoteEntityRef}
|
||||
);
|
||||
|
||||
{$IFDEF SYN_CodeFolding}
|
||||
TSynXMLSyn = class(TSynCustomCodeFoldingHighlighter)
|
||||
{$ELSE}
|
||||
TSynXMLSyn = class(TSynCustomHighlighter)
|
||||
{$ENDIF}
|
||||
private
|
||||
FRange: TRangeState;
|
||||
FTokenID: TtkTokenKind;
|
||||
@@ -149,6 +156,10 @@ type
|
||||
procedure Next; override;
|
||||
procedure SetRange(Value: Pointer); override;
|
||||
procedure ResetRange; override;
|
||||
{$IFDEF SYN_CodeFolding}
|
||||
procedure ScanForFoldRanges(FoldRanges: TSynFoldRanges;
|
||||
LinesToScan: TStrings; FromLine: Integer; ToLine: Integer); override;
|
||||
{$ENDIF}
|
||||
published
|
||||
property ElementAttri: TSynHighlighterAttributes read FElementAttri
|
||||
write FElementAttri;
|
||||
@@ -814,6 +825,122 @@ begin
|
||||
FRange := rsText;
|
||||
end;
|
||||
|
||||
{$IFDEF SYN_CodeFolding}
|
||||
procedure TSynXMLSyn.ScanForFoldRanges(FoldRanges: TSynFoldRanges;
|
||||
LinesToScan: TStrings; FromLine, ToLine: Integer);
|
||||
var
|
||||
Line: Integer;
|
||||
TagStartPos: Integer;
|
||||
CurLine: string;
|
||||
RunPos: Integer;
|
||||
IsClosing: Boolean;
|
||||
IndentLevel, CurLevel: Integer;
|
||||
begin
|
||||
IndentLevel := 0;
|
||||
for Line := FromLine to ToLine do
|
||||
begin
|
||||
CurLine := LinesToScan[Line];
|
||||
RunPos := 1;
|
||||
|
||||
// skip empty lines
|
||||
if CurLine = '' then
|
||||
begin
|
||||
FoldRanges.NoFoldInfo(Line + 1);
|
||||
Continue;
|
||||
end;
|
||||
|
||||
CurLevel := 0;
|
||||
while RunPos <= Length(CurLine) do
|
||||
begin
|
||||
// scan for open tag
|
||||
if CurLine[RunPos] = '<' then
|
||||
begin
|
||||
Inc(RunPos);
|
||||
if RunPos = Length(CurLine) then
|
||||
break;
|
||||
|
||||
// get tag type (prolog, closing or malformed
|
||||
case CurLine[RunPos] of
|
||||
'?' :
|
||||
begin
|
||||
// skip to end and continue
|
||||
Inc(RunPos);
|
||||
while RunPos <= Length(CurLine) do
|
||||
begin
|
||||
if CurLine[RunPos] = '?' then
|
||||
begin
|
||||
break;
|
||||
end;
|
||||
Inc(RunPos);
|
||||
end;
|
||||
Continue;
|
||||
end;
|
||||
|
||||
'/' :
|
||||
begin
|
||||
Inc(RunPos);
|
||||
if RunPos = Length(CurLine) then
|
||||
break;
|
||||
IsClosing := True;
|
||||
end;
|
||||
'>' :
|
||||
begin
|
||||
// malformed tag (without any tag name) -> skip
|
||||
Inc(RunPos);
|
||||
continue;
|
||||
end;
|
||||
else
|
||||
IsClosing := False;
|
||||
end;
|
||||
|
||||
// scan for tag end-marker
|
||||
while RunPos <= Length(CurLine) do
|
||||
begin
|
||||
|
||||
if CurLine[RunPos] = '>' then
|
||||
begin
|
||||
// decrease the current level if it's a closing tag
|
||||
if IsClosing then
|
||||
Dec(CurLevel)
|
||||
else
|
||||
// eventually increase the current level if it's not an empty tag
|
||||
if not (CurLine[RunPos - 1] = '/') then
|
||||
Inc(CurLevel);
|
||||
|
||||
Inc(RunPos);
|
||||
break;
|
||||
end;
|
||||
|
||||
Inc(RunPos);
|
||||
end;
|
||||
end;
|
||||
Inc(RunPos);
|
||||
end;
|
||||
|
||||
// check whether the current level has changed, otherwise continue
|
||||
if (CurLevel = 0) then
|
||||
begin
|
||||
FoldRanges.NoFoldInfo(Line + 1);
|
||||
Continue;
|
||||
end;
|
||||
|
||||
// the level has changed, but in what direction?
|
||||
if CurLevel > 0 then
|
||||
begin
|
||||
// start a new fold range for the next indent level
|
||||
IndentLevel := IndentLevel + CurLevel;
|
||||
FoldRanges.StartFoldRange(Line + 1, 1, IndentLevel);
|
||||
end
|
||||
else
|
||||
begin
|
||||
// stop the fold range for the current indent level and decrease
|
||||
FoldRanges.StopFoldRange(Line + 1, 1, IndentLevel);
|
||||
IndentLevel := IndentLevel + CurLevel;
|
||||
end;
|
||||
end; //for Line
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function TSynXMLSyn.IsFilterStored: Boolean;
|
||||
begin
|
||||
Result := FDefaultFilter <> SYNS_FilterXML;
|
||||
|
||||
@@ -1315,8 +1315,10 @@ begin
|
||||
Result := True;
|
||||
IsOn := True;
|
||||
{$IFNDEF SYN_COMPILER_24_UP}
|
||||
{$IFDEF SYN_WIN32}
|
||||
Mask := 0; // prevent compiler warning
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
for i := 1 to length (AModifiers) do
|
||||
if AModifiers [i] = '-'
|
||||
then IsOn := False
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user