mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-25 17:08:25 +02:00
Designer, editor: Formatting.
git-svn-id: trunk@64302 -
This commit is contained in:
parent
c0926457b8
commit
3feac99f06
@ -5,11 +5,20 @@ unit AssemblerDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Forms, Controls, Graphics,
|
Classes, SysUtils, Math, types,
|
||||||
IDEWindowIntf, DbgIntfBaseTypes, DbgIntfDebuggerBase,
|
// LCL
|
||||||
ComCtrls, StdCtrls, ExtCtrls, LclType, LCLIntf, DebuggerDlg, Debugger,
|
Forms, Controls, Graphics, ComCtrls, StdCtrls, ExtCtrls, Menus, ActnList,
|
||||||
BaseDebugManager, EditorOptions, Math, types, LCLProc, Menus, Clipbrd, ActnList,
|
Clipbrd, LclType, LCLIntf,
|
||||||
IDECommands, IDEImagesIntf, CodeToolManager, CodeCache, SourceEditor;
|
// LazUtils
|
||||||
|
LazLoggerBase,
|
||||||
|
// Codetools
|
||||||
|
CodeToolManager, CodeCache,
|
||||||
|
// IdeIntf
|
||||||
|
IDEWindowIntf, IDECommands, IDEImagesIntf,
|
||||||
|
// DebuggerIntf
|
||||||
|
DbgIntfBaseTypes, DbgIntfDebuggerBase,
|
||||||
|
// IDE
|
||||||
|
DebuggerDlg, Debugger, BaseDebugManager, EditorOptions, SourceEditor;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -30,8 +30,11 @@ unit AlignCompsDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, LCLIntf, Forms, Controls, Buttons, ExtCtrls,
|
Classes,
|
||||||
LazarusIDEStrConsts, ButtonPanel, StdCtrls;
|
// LCL
|
||||||
|
Forms, Controls, ExtCtrls, ButtonPanel, StdCtrls,
|
||||||
|
// IDE
|
||||||
|
LazarusIDEStrConsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TAlignComponentsDialog }
|
{ TAlignComponentsDialog }
|
||||||
|
@ -26,9 +26,13 @@ unit AskCompNameDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics,
|
Classes, SysUtils, TypInfo,
|
||||||
Dialogs, StdCtrls, ButtonPanel, ExtCtrls, PropEdits, LazarusIDEStrConsts,
|
// LCL
|
||||||
TypInfo, LCLType;
|
LCLType, Forms, Controls, Graphics, Dialogs, StdCtrls, ButtonPanel, ExtCtrls,
|
||||||
|
// IdeIntf
|
||||||
|
PropEdits,
|
||||||
|
// IDE
|
||||||
|
LazarusIDEStrConsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -31,7 +31,10 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
FormEditingIntf, LazUtilities;
|
// LazUtils
|
||||||
|
LazUtilities,
|
||||||
|
// IdeIntf
|
||||||
|
FormEditingIntf;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -5,9 +5,12 @@ unit MenuDesignerBase;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
// FCL + LCL
|
// FCL
|
||||||
Classes, SysUtils, fgl,
|
Classes, SysUtils, fgl,
|
||||||
Controls, Forms, Menus, Graphics, LCLProc,
|
// LCL
|
||||||
|
Controls, Forms, Menus, Graphics,
|
||||||
|
// LazUtils
|
||||||
|
LazLoggerBase,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
FormEditingIntf, ComponentEditors,
|
FormEditingIntf, ComponentEditors,
|
||||||
// IDE
|
// IDE
|
||||||
|
@ -7,11 +7,11 @@ interface
|
|||||||
uses
|
uses
|
||||||
// FCL
|
// FCL
|
||||||
Classes, SysUtils, Types, typinfo, strutils,
|
Classes, SysUtils, Types, typinfo, strutils,
|
||||||
// LazUtils
|
|
||||||
LazLogger,
|
|
||||||
// LCL
|
// LCL
|
||||||
ActnList, Controls, Dialogs, StdCtrls, ExtCtrls, Menus,
|
ActnList, Controls, Dialogs, StdCtrls, ExtCtrls, Menus,
|
||||||
Forms, Graphics, ImgList, Themes, LCLType, LCLIntf, LCLProc,
|
Forms, Graphics, ImgList, Themes, LCLType, LCLIntf, LCLProc,
|
||||||
|
// LazUtils
|
||||||
|
LazLogger, LazTracer,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
FormEditingIntf, IDEWindowIntf, IDEImagesIntf, ComponentEditors, IDEDialogs,
|
FormEditingIntf, IDEWindowIntf, IDEImagesIntf, ComponentEditors, IDEDialogs,
|
||||||
PropEdits,
|
PropEdits,
|
||||||
|
@ -5,8 +5,9 @@ unit MenuResolveConflicts;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
// FCL + LCL
|
// FCL
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
|
// LCL
|
||||||
ActnList, ButtonPanel, Controls, StdCtrls, Menus, Forms, Graphics, LCLProc,
|
ActnList, ButtonPanel, Controls, StdCtrls, Menus, Forms, Graphics, LCLProc,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
FormEditingIntf, PropEdits,
|
FormEditingIntf, PropEdits,
|
||||||
|
@ -5,8 +5,9 @@ unit MenuShortcutDisplay;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
// FCL + LCL
|
// FCL
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
|
// LCL
|
||||||
ButtonPanel, Controls, StdCtrls, Menus, Forms, LCLIntf, LCLProc,
|
ButtonPanel, Controls, StdCtrls, Menus, Forms, LCLIntf, LCLProc,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8,
|
LazUTF8,
|
||||||
|
@ -6,8 +6,9 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, strutils, types, fgl,
|
Classes, SysUtils, strutils, types, fgl,
|
||||||
ActnList, ButtonPanel, Controls, Dialogs, StdCtrls, Menus,
|
// LCL
|
||||||
Forms, Graphics, LCLType, LCLIntf, LCLProc,
|
ActnList, ButtonPanel, Controls, Dialogs, StdCtrls, Menus, Forms, Graphics,
|
||||||
|
LCLType, LCLIntf, LCLProc,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazUTF8,
|
LazUTF8,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
|
@ -6,6 +6,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, types, fgl,
|
Classes, SysUtils, types, fgl,
|
||||||
|
// LCL
|
||||||
Buttons, Controls, Dialogs, StdCtrls, ExtCtrls, Menus,
|
Buttons, Controls, Dialogs, StdCtrls, ExtCtrls, Menus,
|
||||||
ComCtrls, Forms, Graphics, Themes, LCLType, LCLIntf, LCLProc,
|
ComCtrls, Forms, Graphics, Themes, LCLType, LCLIntf, LCLProc,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
|
@ -33,9 +33,13 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Math,
|
Classes, SysUtils, Math,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, Graphics, GraphType, Forms, Controls,
|
Graphics, Forms, Controls,
|
||||||
|
// LazUtils
|
||||||
|
GraphType, LazLoggerBase,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
FormEditingIntf, CustomNonFormDesigner;
|
FormEditingIntf,
|
||||||
|
// IDE
|
||||||
|
CustomNonFormDesigner;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -19,15 +19,16 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
// LCL
|
// LCL
|
||||||
LCLProc, Forms, Controls, Buttons, StdCtrls,
|
Forms, Controls, Buttons, StdCtrls, ExtCtrls, Dialogs, Menus, ComCtrls, Grids,
|
||||||
ExtCtrls, Dialogs, Menus, ComCtrls, Grids, CustomTimer,
|
CustomTimer,
|
||||||
// LazUtils
|
// LazUtils
|
||||||
LazFileUtils, LazConfigStorage,
|
LazFileUtils, LazConfigStorage, LazLoggerBase,
|
||||||
// CodeTools
|
// CodeTools
|
||||||
CodeToolManager, CodeCache,
|
CodeToolManager, CodeCache,
|
||||||
|
// BuildIntf
|
||||||
|
BaseIDEIntf, ProjectIntf,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
BaseIDEIntf, LazIDEIntf, ProjectIntf, ObjectInspector, OIFavoriteProperties,
|
LazIDEIntf, ObjectInspector, OIFavoriteProperties, PropEdits, IDEDialogs,
|
||||||
PropEdits, IDEDialogs,
|
|
||||||
// IDE
|
// IDE
|
||||||
DialogProcs, LazConf, LazarusIDEStrConsts;
|
DialogProcs, LazConf, LazarusIDEStrConsts;
|
||||||
|
|
||||||
|
@ -30,8 +30,11 @@ unit ScaleCompsDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLIntf, LCLProc, Forms, Controls, Buttons, StdCtrls,
|
Classes, SysUtils,
|
||||||
ExtCtrls, LazarusIDEStrConsts, ButtonPanel, Spin;
|
// LCL
|
||||||
|
LCLIntf, Forms, Controls, StdCtrls, ButtonPanel, Spin,
|
||||||
|
// IDE
|
||||||
|
LazarusIDEStrConsts;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
|
@ -30,8 +30,9 @@ unit SizeCompsDlg;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LCLIntf, Forms, Controls, Buttons, ExtCtrls, StdCtrls,
|
Classes, SysUtils,
|
||||||
ButtonPanel;
|
// LCL
|
||||||
|
Forms, Controls, ExtCtrls, StdCtrls, ButtonPanel;
|
||||||
|
|
||||||
type
|
type
|
||||||
{ TSizeComponentsDialog }
|
{ TSizeComponentsDialog }
|
||||||
|
@ -34,7 +34,9 @@ interface
|
|||||||
uses
|
uses
|
||||||
Classes, SysUtils, Laz_AVL_Tree,
|
Classes, SysUtils, Laz_AVL_Tree,
|
||||||
// LCL
|
// LCL
|
||||||
Forms, Controls, Dialogs, Buttons, ExtCtrls, StdCtrls, ComCtrls, LCLType, LCLProc,
|
Forms, Controls, Dialogs, Buttons, ExtCtrls, StdCtrls, ComCtrls, LCLType,
|
||||||
|
// LazUtils
|
||||||
|
LazLoggerBase,
|
||||||
// IdeIntf
|
// IdeIntf
|
||||||
PropEdits, IDEDialogs, IDEImagesIntf,
|
PropEdits, IDEDialogs, IDEImagesIntf,
|
||||||
//IDE
|
//IDE
|
||||||
|
@ -81,7 +81,7 @@ type
|
|||||||
TSynHighlightElement = TSynHighlighterAttributes;
|
TSynHighlightElement = TSynHighlighterAttributes;
|
||||||
TCustomSynClass = class of TSrcIDEHighlighter;
|
TCustomSynClass = class of TSrcIDEHighlighter;
|
||||||
|
|
||||||
TLazSynPluginTemplateMultiCaret = class(TForm) end;
|
TLazSynPluginTemplateMultiCaret = class(TForm) end;
|
||||||
TLazSynPluginTemplateEditForm = class(TForm) end;
|
TLazSynPluginTemplateEditForm = class(TForm) end;
|
||||||
TLazSynPluginTemplateEditFormOff = class(TForm) end;
|
TLazSynPluginTemplateEditFormOff = class(TForm) end;
|
||||||
TLazSynPluginSyncroEditFormSel = class(TForm) end;
|
TLazSynPluginSyncroEditFormSel = class(TForm) end;
|
||||||
@ -1267,8 +1267,7 @@ type
|
|||||||
property IsFallback: Boolean read FIsFallback;
|
property IsFallback: Boolean read FIsFallback;
|
||||||
property Desc: String read FDesc write FDesc;
|
property Desc: String read FDesc write FDesc;
|
||||||
//published
|
//published
|
||||||
property Caption: String
|
property Caption: String read FCaption write FCaption;
|
||||||
read FCaption write FCaption;
|
|
||||||
published
|
published
|
||||||
property Enabled: Boolean
|
property Enabled: Boolean
|
||||||
read FEnabled write SetEnabled;
|
read FEnabled write SetEnabled;
|
||||||
@ -1401,7 +1400,7 @@ type
|
|||||||
property UseGlobalIDECommandList: Boolean read FUseGlobalIDECommandList write FUseGlobalIDECommandList;
|
property UseGlobalIDECommandList: Boolean read FUseGlobalIDECommandList write FUseGlobalIDECommandList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TEditorOptions - Editor Options object used to hold the editor options }
|
{ TEditorOptions }
|
||||||
|
|
||||||
TEditorOptions = class(TIDEEditorOptions)
|
TEditorOptions = class(TIDEEditorOptions)
|
||||||
private
|
private
|
||||||
@ -1569,8 +1568,7 @@ type
|
|||||||
function GetColorSchemeLanguage(aHighLighter: TSynCustomHighlighter; SynColorSchemeName: String = ''): TColorSchemeLanguage;
|
function GetColorSchemeLanguage(aHighLighter: TSynCustomHighlighter; SynColorSchemeName: String = ''): TColorSchemeLanguage;
|
||||||
function ReadPascalColorScheme: String;
|
function ReadPascalColorScheme: String;
|
||||||
procedure WriteColorScheme(const LanguageName, SynColorScheme: String);
|
procedure WriteColorScheme(const LanguageName, SynColorScheme: String);
|
||||||
procedure ReadHighlighterSettings(Syn: TSrcIDEHighlighter;
|
procedure ReadHighlighterSettings(Syn: TSrcIDEHighlighter; SynColorScheme: String);
|
||||||
SynColorScheme: String);
|
|
||||||
|
|
||||||
procedure ReadHighlighterFoldSettings(Syn: TSrcIDEHighlighter; ReadForOptions: Boolean = False);
|
procedure ReadHighlighterFoldSettings(Syn: TSrcIDEHighlighter; ReadForOptions: Boolean = False);
|
||||||
procedure ReadDefaultsForHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
procedure ReadDefaultsForHighlighterFoldSettings(Syn: TSrcIDEHighlighter);
|
||||||
@ -2327,7 +2325,6 @@ begin
|
|||||||
inherited Option := AValue;
|
inherited Option := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure RepairEditorFontSize(var FontSize: integer);
|
procedure RepairEditorFontSize(var FontSize: integer);
|
||||||
begin
|
begin
|
||||||
if ((FontSize>=0) and (FontSize<=EditorOptionsMinimumFontSize))
|
if ((FontSize>=0) and (FontSize<=EditorOptionsMinimumFontSize))
|
||||||
@ -2424,6 +2421,7 @@ var
|
|||||||
FreeAndNil(XMLConfig);
|
FreeAndNil(XMLConfig);
|
||||||
FreeAndNil(Stream);
|
FreeAndNil(Stream);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if not Assigned(Singleton) then begin
|
if not Assigned(Singleton) then begin
|
||||||
InitLocale;
|
InitLocale;
|
||||||
@ -2501,7 +2499,6 @@ begin
|
|||||||
EditorOptionsEditAccessDefaults[8].Caption := dlgEditAccessCaptionUnLockedOpenNewInAnyWin;
|
EditorOptionsEditAccessDefaults[8].Caption := dlgEditAccessCaptionUnLockedOpenNewInAnyWin;
|
||||||
EditorOptionsEditAccessDefaults[8].Desc := dlgEditAccessDescUnLockedOpenNewInAnyWin;
|
EditorOptionsEditAccessDefaults[8].Desc := dlgEditAccessDescUnLockedOpenNewInAnyWin;
|
||||||
|
|
||||||
|
|
||||||
// update translation
|
// update translation
|
||||||
EditorOptionsFoldInfoPas[ 0].Name := dlgFoldPasProcedure;
|
EditorOptionsFoldInfoPas[ 0].Name := dlgFoldPasProcedure;
|
||||||
EditorOptionsFoldInfoPas[ 1].Name := dlgFoldLocalPasVarType;
|
EditorOptionsFoldInfoPas[ 1].Name := dlgFoldLocalPasVarType;
|
||||||
@ -3135,8 +3132,6 @@ begin
|
|||||||
NewInfo.Prepare(lshCss);
|
NewInfo.Prepare(lshCss);
|
||||||
Add(NewInfo);
|
Add(NewInfo);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// create info for JScript
|
// create info for JScript
|
||||||
NewInfo := TEditOptLanguageInfo.Create;
|
NewInfo := TEditOptLanguageInfo.Create;
|
||||||
with NewInfo do
|
with NewInfo do
|
||||||
@ -3334,16 +3329,14 @@ begin
|
|||||||
dec(Result);
|
dec(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEditOptLangList.FindByClass(
|
function TEditOptLangList.FindByClass(CustomSynClass: TCustomSynClass): Integer;
|
||||||
CustomSynClass: TCustomSynClass): Integer;
|
|
||||||
begin
|
begin
|
||||||
Result := Count - 1;
|
Result := Count - 1;
|
||||||
while (Result >= 0) and (Items[Result].SynClass <> CustomSynClass) do
|
while (Result >= 0) and (Items[Result].SynClass <> CustomSynClass) do
|
||||||
dec(Result);
|
dec(Result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEditOptLangList.FindByHighlighter(Hilighter:
|
function TEditOptLangList.FindByHighlighter(Hilighter: TSynCustomHighlighter): Integer;
|
||||||
TSynCustomHighlighter): Integer;
|
|
||||||
begin
|
begin
|
||||||
if Hilighter <> Nil then
|
if Hilighter <> Nil then
|
||||||
Result := FindByClass(TCustomSynClass(Hilighter.ClassType))
|
Result := FindByClass(TCustomSynClass(Hilighter.ClassType))
|
||||||
@ -3371,8 +3364,7 @@ begin
|
|||||||
Result := '';
|
Result := '';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TEditOptLangList.GetInfoByType(AType: TLazSyntaxHighlighter
|
function TEditOptLangList.GetInfoByType(AType: TLazSyntaxHighlighter): TEditOptLanguageInfo;
|
||||||
): TEditOptLanguageInfo;
|
|
||||||
var
|
var
|
||||||
i: LongInt;
|
i: LongInt;
|
||||||
begin
|
begin
|
||||||
@ -3525,7 +3517,6 @@ begin
|
|||||||
FTextShiftCtrlExtra2Click := mbaNone;
|
FTextShiftCtrlExtra2Click := mbaNone;
|
||||||
FTextShiftExtra2Click := mbaNone;
|
FTextShiftExtra2Click := mbaNone;
|
||||||
|
|
||||||
|
|
||||||
FTextRightMoveCaret := False;
|
FTextRightMoveCaret := False;
|
||||||
FTextDrag := True;
|
FTextDrag := True;
|
||||||
FSelectOnLineNumbers := True;
|
FSelectOnLineNumbers := True;
|
||||||
@ -3925,10 +3916,9 @@ begin
|
|||||||
AddWheelAct(FShiftAltCtrlHorizWheel, [ssShift, ssAlt, ssCtrl], ModKeys, True);
|
AddWheelAct(FShiftAltCtrlHorizWheel, [ssShift, ssAlt, ssCtrl], ModKeys, True);
|
||||||
|
|
||||||
if FTextDrag then
|
if FTextDrag then
|
||||||
with FSelActions do begin
|
FSelActions.AddCommand(emcStartDragMove, False, mbXLeft, ccSingle, cdDown,
|
||||||
AddCommand(emcStartDragMove, False, mbXLeft, ccSingle, cdDown, [], [ssShift], emcoNotDragedNoCaretOnUp);
|
[], [ssShift], emcoNotDragedNoCaretOnUp);
|
||||||
end;
|
FTextActions.AddCommand(emcNone, True, mbXLeft, ccSingle, cdUp, [], [], 0, 99);
|
||||||
FTextActions.AddCommand(emcNone, True, mbXLeft, ccSingle, cdUp, [], [], 0, 99);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TEditorMouseOptions.ResetToUserScheme;
|
procedure TEditorMouseOptions.ResetToUserScheme;
|
||||||
@ -3978,7 +3968,6 @@ var
|
|||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
FName := Src.FName;
|
FName := Src.FName;
|
||||||
|
|
||||||
FGutterLeft := Src.GutterLeft;
|
FGutterLeft := Src.GutterLeft;
|
||||||
FSelectOnLineNumbers := Src.SelectOnLineNumbers;
|
FSelectOnLineNumbers := Src.SelectOnLineNumbers;
|
||||||
FTextDrag := Src.TextDrag;
|
FTextDrag := Src.TextDrag;
|
||||||
@ -3987,7 +3976,7 @@ begin
|
|||||||
|
|
||||||
// left multi click
|
// left multi click
|
||||||
FTextDoubleLeftClick := Src.TextDoubleLeftClick;
|
FTextDoubleLeftClick := Src.TextDoubleLeftClick;
|
||||||
FTextTripleLeftClick := Src.TextTripleLeftClick;
|
FTextTripleLeftClick := Src.TextTripleLeftClick;
|
||||||
FTextQuadLeftClick := Src.TextQuadLeftClick;
|
FTextQuadLeftClick := Src.TextQuadLeftClick;
|
||||||
FTextShiftDoubleLeftClick := Src.TextShiftDoubleLeftClick;
|
FTextShiftDoubleLeftClick := Src.TextShiftDoubleLeftClick;
|
||||||
FTextAltDoubleLeftClick := Src.TextAltDoubleLeftClick;
|
FTextAltDoubleLeftClick := Src.TextAltDoubleLeftClick;
|
||||||
@ -4055,8 +4044,6 @@ begin
|
|||||||
FTextShiftCtrlExtra2Click := Src.TextShiftCtrlExtra2Click;
|
FTextShiftCtrlExtra2Click := Src.TextShiftCtrlExtra2Click;
|
||||||
FTextShiftExtra2Click := Src.TextShiftExtra2Click;
|
FTextShiftExtra2Click := Src.TextShiftExtra2Click;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
AssignActions(Src);
|
AssignActions(Src);
|
||||||
|
|
||||||
if WithUserSchemes then begin
|
if WithUserSchemes then begin
|
||||||
@ -4861,16 +4848,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
fShowTabCloseButtons :=
|
fShowTabCloseButtons :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/General/Editor/ShowTabCloseButtons', True);
|
||||||
'EditorOptions/General/Editor/ShowTabCloseButtons', True);
|
|
||||||
FHideSingleTabInWindow :=
|
FHideSingleTabInWindow :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/General/Editor/HideSingleTabInWindow', False);
|
||||||
'EditorOptions/General/Editor/HideSingleTabInWindow', False);
|
|
||||||
fShowTabNumbers :=
|
fShowTabNumbers :=
|
||||||
XMLConfig.GetValue('EditorOptions/General/Editor/ShowTabNumbers', False);
|
XMLConfig.GetValue('EditorOptions/General/Editor/ShowTabNumbers', False);
|
||||||
FCopyWordAtCursorOnCopyNone :=
|
FCopyWordAtCursorOnCopyNone :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/General/Editor/CopyWordAtCursorOnCopyNone', True);
|
||||||
'EditorOptions/General/Editor/CopyWordAtCursorOnCopyNone', True);
|
|
||||||
FShowGutterHints :=
|
FShowGutterHints :=
|
||||||
XMLConfig.GetValue('EditorOptions/General/Editor/ShowGutterHints', True);
|
XMLConfig.GetValue('EditorOptions/General/Editor/ShowGutterHints', True);
|
||||||
fUndoAfterSave :=
|
fUndoAfterSave :=
|
||||||
@ -4878,8 +4862,7 @@ begin
|
|||||||
fFindTextAtCursor :=
|
fFindTextAtCursor :=
|
||||||
XMLConfig.GetValue('EditorOptions/General/Editor/FindTextAtCursor', True);
|
XMLConfig.GetValue('EditorOptions/General/Editor/FindTextAtCursor', True);
|
||||||
fUseSyntaxHighlight :=
|
fUseSyntaxHighlight :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/General/Editor/UseSyntaxHighlight', True);
|
||||||
'EditorOptions/General/Editor/UseSyntaxHighlight', True);
|
|
||||||
fBlockIndent :=
|
fBlockIndent :=
|
||||||
XMLConfig.GetValue('EditorOptions/General/Editor/BlockIndent', 2);
|
XMLConfig.GetValue('EditorOptions/General/Editor/BlockIndent', 2);
|
||||||
FBlockTabIndent :=
|
FBlockTabIndent :=
|
||||||
@ -4923,13 +4906,11 @@ begin
|
|||||||
XMLConfig.GetValue('EditorOptions/Display/EditorFont', SynDefaultFontName);
|
XMLConfig.GetValue('EditorOptions/Display/EditorFont', SynDefaultFontName);
|
||||||
if FileVersion < 8 then begin
|
if FileVersion < 8 then begin
|
||||||
fEditorFontSize :=
|
fEditorFontSize :=
|
||||||
XMLConfig.GetValue('EditorOptions/Display/EditorFontHeight',
|
XMLConfig.GetValue('EditorOptions/Display/EditorFontHeight', SynDefaultFontHeight);
|
||||||
SynDefaultFontHeight);
|
|
||||||
fEditorFontSize := FontHeightToSize(fEditorFontSize);
|
fEditorFontSize := FontHeightToSize(fEditorFontSize);
|
||||||
end else begin
|
end else begin
|
||||||
fEditorFontSize :=
|
fEditorFontSize :=
|
||||||
XMLConfig.GetValue('EditorOptions/Display/EditorFontSize',
|
XMLConfig.GetValue('EditorOptions/Display/EditorFontSize', SynDefaultFontSize);
|
||||||
SynDefaultFontSize);
|
|
||||||
end;
|
end;
|
||||||
RepairEditorFontSize(fEditorFontSize);
|
RepairEditorFontSize(fEditorFontSize);
|
||||||
fExtraCharSpacing :=
|
fExtraCharSpacing :=
|
||||||
@ -4937,8 +4918,7 @@ begin
|
|||||||
fExtraLineSpacing :=
|
fExtraLineSpacing :=
|
||||||
XMLConfig.GetValue('EditorOptions/Display/ExtraLineSpacing', 1);
|
XMLConfig.GetValue('EditorOptions/Display/ExtraLineSpacing', 1);
|
||||||
fDisableAntialiasing :=
|
fDisableAntialiasing :=
|
||||||
XMLConfig.GetValue('EditorOptions/Display/DisableAntialiasing',
|
XMLConfig.GetValue('EditorOptions/Display/DisableAntialiasing', FileVersion<7);
|
||||||
FileVersion<7);
|
|
||||||
FDoNotWarnForFont :=
|
FDoNotWarnForFont :=
|
||||||
XMLConfig.GetValue('EditorOptions/Display/DoNotWarnForFont', '');
|
XMLConfig.GetValue('EditorOptions/Display/DoNotWarnForFont', '');
|
||||||
|
|
||||||
@ -4961,35 +4941,27 @@ begin
|
|||||||
FUserDefinedColors.LoadFromXMLConfig(xmlconfig, 'EditorOptions/UserDefinedColors');
|
FUserDefinedColors.LoadFromXMLConfig(xmlconfig, 'EditorOptions/UserDefinedColors');
|
||||||
|
|
||||||
FMarkupCurWordTime :=
|
FMarkupCurWordTime :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/Time', 1500);
|
||||||
'EditorOptions/Display/MarkupCurrentWord/Time', 1500);
|
|
||||||
FMarkupCurWordFullLen :=
|
FMarkupCurWordFullLen :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/FullLen', 3);
|
||||||
'EditorOptions/Display/MarkupCurrentWord/FullLen', 3);
|
|
||||||
// check deprecated value
|
// check deprecated value
|
||||||
if not XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/FullWord', True) then
|
if not XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/FullWord', True) then
|
||||||
FMarkupCurWordFullLen := 0;
|
FMarkupCurWordFullLen := 0;
|
||||||
XMLConfig.DeleteValue('EditorOptions/Display/MarkupCurrentWord/FullWord');
|
XMLConfig.DeleteValue('EditorOptions/Display/MarkupCurrentWord/FullWord');
|
||||||
FMarkupCurWordNoKeyword :=
|
FMarkupCurWordNoKeyword :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/NoKeyword', True);
|
||||||
'EditorOptions/Display/MarkupCurrentWord/NoKeyword', True);
|
|
||||||
FMarkupCurWordTrim :=
|
FMarkupCurWordTrim :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/Trim', True);
|
||||||
'EditorOptions/Display/MarkupCurrentWord/Trim', True);
|
|
||||||
FMarkupCurWordNoTimer :=
|
FMarkupCurWordNoTimer :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/Display/MarkupCurrentWord/NoTimer', False);
|
||||||
'EditorOptions/Display/MarkupCurrentWord/NoTimer', False);
|
|
||||||
FShowFileNameInCaption :=
|
FShowFileNameInCaption :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/Display/ShowFileNameInCaption', False);
|
||||||
'EditorOptions/Display/ShowFileNameInCaption', False);
|
|
||||||
|
|
||||||
// Code Tools options
|
// Code Tools options
|
||||||
fAutoBlockCompletion :=
|
fAutoBlockCompletion :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/CodeTools/AutoBlockCompletion', True);
|
||||||
'EditorOptions/CodeTools/AutoBlockCompletion', True);
|
|
||||||
fAutoDisplayFuncPrototypes :=
|
fAutoDisplayFuncPrototypes :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/CodeTools/AutoDisplayFuncPrototypes', True);
|
||||||
'EditorOptions/CodeTools/AutoDisplayFuncPrototypes', True);
|
|
||||||
fAutoCodeParameters :=
|
fAutoCodeParameters :=
|
||||||
XMLConfig.GetValue('EditorOptions/CodeTools/AutoCodeParameters', True);
|
XMLConfig.GetValue('EditorOptions/CodeTools/AutoCodeParameters', True);
|
||||||
fAutoToolTipExprEval :=
|
fAutoToolTipExprEval :=
|
||||||
@ -5004,8 +4976,7 @@ begin
|
|||||||
XMLConfig.GetValue('EditorOptions/CodeTools/CodeTemplateFileName'
|
XMLConfig.GetValue('EditorOptions/CodeTools/CodeTemplateFileName'
|
||||||
, TrimFilename(AppendPathDelim(GetPrimaryConfigPath) + DefaultCodeTemplatesFilename));
|
, TrimFilename(AppendPathDelim(GetPrimaryConfigPath) + DefaultCodeTemplatesFilename));
|
||||||
fCTemplIndentToTokenStart :=
|
fCTemplIndentToTokenStart :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/CodeTools/CodeTemplateIndentToTokenStart/Value', False);
|
||||||
'EditorOptions/CodeTools/CodeTemplateIndentToTokenStart/Value', False);
|
|
||||||
fAutoRemoveEmptyMethods :=
|
fAutoRemoveEmptyMethods :=
|
||||||
XMLConfig.GetValue('EditorOptions/CodeTools/AutoRemoveEmptyMethods', False);
|
XMLConfig.GetValue('EditorOptions/CodeTools/AutoRemoveEmptyMethods', False);
|
||||||
FCompletionLongLineHintInMSec :=
|
FCompletionLongLineHintInMSec :=
|
||||||
@ -5016,14 +4987,11 @@ begin
|
|||||||
|
|
||||||
// Code Folding
|
// Code Folding
|
||||||
FUseCodeFolding :=
|
FUseCodeFolding :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/CodeFolding/UseCodeFolding', True);
|
||||||
'EditorOptions/CodeFolding/UseCodeFolding', True);
|
|
||||||
FUseMarkupWordBracket :=
|
FUseMarkupWordBracket :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/CodeFolding/UseMarkupWordBracket', True);
|
||||||
'EditorOptions/CodeFolding/UseMarkupWordBracket', True);
|
|
||||||
FUseMarkupOutline :=
|
FUseMarkupOutline :=
|
||||||
XMLConfig.GetValue(
|
XMLConfig.GetValue('EditorOptions/CodeFolding/UseMarkupOutline', False);
|
||||||
'EditorOptions/CodeFolding/UseMarkupOutline', False);
|
|
||||||
|
|
||||||
FUserMouseSettings.LoadFromXml(XMLConfig, 'EditorOptions/Mouse/',
|
FUserMouseSettings.LoadFromXml(XMLConfig, 'EditorOptions/Mouse/',
|
||||||
'EditorOptions/General/Editor/', FileVersion);
|
'EditorOptions/General/Editor/', FileVersion);
|
||||||
@ -5599,7 +5567,6 @@ begin
|
|||||||
XMLConfig.SetValue('EditorOptions/Color/Version', EditorOptsFormatVersion);
|
XMLConfig.SetValue('EditorOptions/Color/Version', EditorOptsFormatVersion);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TEditorOptions.ReadHighlighterSettings(Syn: TSrcIDEHighlighter;
|
procedure TEditorOptions.ReadHighlighterSettings(Syn: TSrcIDEHighlighter;
|
||||||
SynColorScheme: String);
|
SynColorScheme: String);
|
||||||
// if SynColorScheme='' then default ColorScheme will be used
|
// if SynColorScheme='' then default ColorScheme will be used
|
||||||
@ -5609,7 +5576,6 @@ begin
|
|||||||
LangScheme := GetColorSchemeLanguage(Syn, SynColorScheme);
|
LangScheme := GetColorSchemeLanguage(Syn, SynColorScheme);
|
||||||
if LangScheme = nil then
|
if LangScheme = nil then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
LangScheme.ApplyTo(Syn);
|
LangScheme.ApplyTo(Syn);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -5638,10 +5604,10 @@ begin
|
|||||||
ConfName := TheFoldInfo.Info^[i].Xml;
|
ConfName := TheFoldInfo.Info^[i].Xml;
|
||||||
Path := 'EditorOptions/FoldConfig/Lang' +
|
Path := 'EditorOptions/FoldConfig/Lang' +
|
||||||
StrToValidXMLName(Syn.LanguageName) + '/Type' + ConfName + '/' ;
|
StrToValidXMLName(Syn.LanguageName) + '/Type' + ConfName + '/' ;
|
||||||
// try reading the old config first
|
// try reading the old config first
|
||||||
FoldHl.FoldConfig[idx].Enabled :=
|
FoldHl.FoldConfig[idx].Enabled :=
|
||||||
XMLConfig.GetValue(Path + 'Enabled/Value', FoldHl.FoldConfig[idx].Enabled);
|
XMLConfig.GetValue(Path + 'Enabled/Value', FoldHl.FoldConfig[idx].Enabled);
|
||||||
XMLConfig.ReadObject(Path + 'Settings/', FoldHl.FoldConfig[idx], DefHl.FoldConfig[idx]);
|
XMLConfig.ReadObject(Path + 'Settings/', FoldHl.FoldConfig[idx], DefHl.FoldConfig[idx]);
|
||||||
|
|
||||||
(* if ReadForOptions=True then Enabled appies only to fmFold,fmHide.
|
(* if ReadForOptions=True then Enabled appies only to fmFold,fmHide.
|
||||||
This allows to store what selection was previously active *)
|
This allows to store what selection was previously active *)
|
||||||
@ -5680,9 +5646,8 @@ begin
|
|||||||
if (syn is TSynCustomFoldHighlighter) then begin
|
if (syn is TSynCustomFoldHighlighter) then begin
|
||||||
TheFoldInfo := EditorOptionsFoldDefaults[HighlighterList[h].TheType];
|
TheFoldInfo := EditorOptionsFoldDefaults[HighlighterList[h].TheType];
|
||||||
for i := 0 to TheFoldInfo.Count - 1 do
|
for i := 0 to TheFoldInfo.Count - 1 do
|
||||||
with TSynCustomFoldHighlighter(Syn).FoldConfig[TheFoldInfo.Info^[i].Index] do begin
|
with TSynCustomFoldHighlighter(Syn).FoldConfig[TheFoldInfo.Info^[i].Index] do
|
||||||
Enabled := TheFoldInfo.Info^[i].Enabled;
|
Enabled := TheFoldInfo.Info^[i].Enabled;
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -6214,7 +6179,7 @@ end;
|
|||||||
function TColorSchemeAttribute.GetSchemeGlobal: TColorSchemeAttribute;
|
function TColorSchemeAttribute.GetSchemeGlobal: TColorSchemeAttribute;
|
||||||
begin
|
begin
|
||||||
Result := nil;
|
Result := nil;
|
||||||
if (FOwner <> nil) and (FOwner.FOwner<> nil) and
|
if (FOwner <> nil) and (FOwner.FOwner <> nil) and
|
||||||
(FOwner.FOwner.FDefaultColors <> nil)
|
(FOwner.FOwner.FDefaultColors <> nil)
|
||||||
then
|
then
|
||||||
Result := FOwner.FOwner.FDefaultColors.Attribute[StoredName];
|
Result := FOwner.FOwner.FDefaultColors.Attribute[StoredName];
|
||||||
@ -6323,7 +6288,7 @@ begin
|
|||||||
Result := (FGroup = Other.FGroup) and
|
Result := (FGroup = Other.FGroup) and
|
||||||
(FUseSchemeGlobals = Other.FUseSchemeGlobals) and
|
(FUseSchemeGlobals = Other.FUseSchemeGlobals) and
|
||||||
// ignore resourcestring Name and Caption
|
// ignore resourcestring Name and Caption
|
||||||
(StoredName = Other.StoredName) and
|
(StoredName = Other.StoredName) and
|
||||||
(Background = Other.Background) and
|
(Background = Other.Background) and
|
||||||
(Foreground = Other.Foreground) and
|
(Foreground = Other.Foreground) and
|
||||||
(FrameColor = Other.FrameColor) and
|
(FrameColor = Other.FrameColor) and
|
||||||
@ -6335,7 +6300,7 @@ begin
|
|||||||
(Style = Other.Style) and
|
(Style = Other.Style) and
|
||||||
(StyleMask = Other.StyleMask) and
|
(StyleMask = Other.StyleMask) and
|
||||||
(Features = Other.Features);
|
(Features = Other.Features);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TColorSchemeAttribute.GetStoredValuesForAttrib: TColorSchemeAttribute;
|
function TColorSchemeAttribute.GetStoredValuesForAttrib: TColorSchemeAttribute;
|
||||||
begin
|
begin
|
||||||
@ -6555,7 +6520,6 @@ begin
|
|||||||
FormatVersion := aXMLConfig.GetValue(aPath + 'Version', 0);
|
FormatVersion := aXMLConfig.GetValue(aPath + 'Version', 0);
|
||||||
LoadFromXml(aXMLConfig, aPath, nil, FormatVersion);
|
LoadFromXml(aXMLConfig, aPath, nil, FormatVersion);
|
||||||
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TColorSchemeLanguage.Destroy;
|
destructor TColorSchemeLanguage.Destroy;
|
||||||
@ -6739,10 +6703,8 @@ begin
|
|||||||
aPath := aPath + 'Lang' + StrToValidXMLName(FLanguageName) + '/';
|
aPath := aPath + 'Lang' + StrToValidXMLName(FLanguageName) + '/';
|
||||||
if (Defaults <> nil) and Self.Equals(Defaults) then begin
|
if (Defaults <> nil) and Self.Equals(Defaults) then begin
|
||||||
aXMLConfig.DeletePath(aPath + 'Scheme' + StrToValidXMLName(Name));
|
aXMLConfig.DeletePath(aPath + 'Scheme' + StrToValidXMLName(Name));
|
||||||
if not FIsSchemeDefault then begin
|
if not (FIsSchemeDefault or aXMLConfig.HasChildPaths(aPath)) then
|
||||||
if not aXMLConfig.HasChildPaths(aPath) then
|
aXMLConfig.DeletePath(aPath);
|
||||||
aXMLConfig.DeletePath(aPath);
|
|
||||||
end;
|
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
aXMLConfig.SetValue(aPath + 'Version', EditorOptsFormatVersion);
|
aXMLConfig.SetValue(aPath + 'Version', EditorOptsFormatVersion);
|
||||||
@ -7056,8 +7018,7 @@ begin
|
|||||||
for i := low(TLazSyntaxHighlighter) to high(TLazSyntaxHighlighter) do
|
for i := low(TLazSyntaxHighlighter) to high(TLazSyntaxHighlighter) do
|
||||||
// do not create duplicates
|
// do not create duplicates
|
||||||
if CompatibleLazSyntaxHilighter[i] = i then
|
if CompatibleLazSyntaxHilighter[i] = i then
|
||||||
FColorSchemes[i] := TColorSchemeLanguage.CreateFromXml(Self, i, aXMLConfig,
|
FColorSchemes[i] := TColorSchemeLanguage.CreateFromXml(Self, i, aXMLConfig, aPath)
|
||||||
aPath)
|
|
||||||
else
|
else
|
||||||
FColorSchemes[i] := nil;
|
FColorSchemes[i] := nil;
|
||||||
end;
|
end;
|
||||||
@ -7211,8 +7172,7 @@ begin
|
|||||||
Def := Defaults.ColorSchemeGroupAtPos[i]
|
Def := Defaults.ColorSchemeGroupAtPos[i]
|
||||||
else
|
else
|
||||||
Def := nil;
|
Def := nil;
|
||||||
ColorSchemeGroupAtPos[i].LoadFromXml(aXMLConfig, aPath,
|
ColorSchemeGroupAtPos[i].LoadFromXml(aXMLConfig, aPath, Def, aOldPath);
|
||||||
Def, aOldPath);
|
|
||||||
end;
|
end;
|
||||||
// all Schemes have read (and relocated) the old values
|
// all Schemes have read (and relocated) the old values
|
||||||
if aOldPath <> '' then begin
|
if aOldPath <> '' then begin
|
||||||
|
@ -348,8 +348,7 @@ type
|
|||||||
function RefreshEditorSettings: Boolean;
|
function RefreshEditorSettings: Boolean;
|
||||||
function GetModified: Boolean; override;
|
function GetModified: Boolean; override;
|
||||||
procedure SetModified(const NewValue: Boolean); override;
|
procedure SetModified(const NewValue: Boolean); override;
|
||||||
procedure SetSyntaxHighlighterType(
|
procedure SetSyntaxHighlighterType(AHighlighterType: TLazSyntaxHighlighter);
|
||||||
ASyntaxHighlighterType: TLazSyntaxHighlighter);
|
|
||||||
procedure SetErrorLine(NewLine: integer);
|
procedure SetErrorLine(NewLine: integer);
|
||||||
procedure SetExecutionLine(NewLine: integer);
|
procedure SetExecutionLine(NewLine: integer);
|
||||||
procedure StartIdentCompletionBox(JumpToError, CanAutoComplete: boolean);
|
procedure StartIdentCompletionBox(JumpToError, CanAutoComplete: boolean);
|
||||||
@ -4893,23 +4892,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSourceEditor.SetSyntaxHighlighterType(
|
procedure TSourceEditor.SetSyntaxHighlighterType(AHighlighterType: TLazSyntaxHighlighter);
|
||||||
ASyntaxHighlighterType: TLazSyntaxHighlighter);
|
|
||||||
var
|
var
|
||||||
HlIsPas, OldHlIsPas: Boolean;
|
HlIsPas, OldHlIsPas: Boolean;
|
||||||
begin
|
begin
|
||||||
if (ASyntaxHighlighterType=fSyntaxHighlighterType)
|
if (AHighlighterType=fSyntaxHighlighterType)
|
||||||
and ((FEditor.Highlighter<>nil) = EditorOpts.UseSyntaxHighlight) then exit;
|
and ((FEditor.Highlighter<>nil) = EditorOpts.UseSyntaxHighlight) then exit;
|
||||||
|
|
||||||
OldHlIsPas := FEditor.Highlighter is TSynPasSyn;
|
OldHlIsPas := FEditor.Highlighter is TSynPasSyn;
|
||||||
HlIsPas := False;
|
HlIsPas := False;
|
||||||
if EditorOpts.UseSyntaxHighlight
|
if EditorOpts.UseSyntaxHighlight then begin
|
||||||
then begin
|
if Highlighters[AHighlighterType]=nil then
|
||||||
if Highlighters[ASyntaxHighlighterType]=nil then begin
|
Highlighters[AHighlighterType]:=EditorOpts.CreateSyn(AHighlighterType);
|
||||||
Highlighters[ASyntaxHighlighterType]:=
|
FEditor.Highlighter:=Highlighters[AHighlighterType];
|
||||||
EditorOpts.CreateSyn(ASyntaxHighlighterType);
|
|
||||||
end;
|
|
||||||
FEditor.Highlighter:=Highlighters[ASyntaxHighlighterType];
|
|
||||||
HlIsPas := FEditor.Highlighter is TSynPasSyn;
|
HlIsPas := FEditor.Highlighter is TSynPasSyn;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -4923,7 +4918,7 @@ begin
|
|||||||
EditorOpts.GetSynEditSettings(FEditor, nil);
|
EditorOpts.GetSynEditSettings(FEditor, nil);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FSyntaxHighlighterType:=ASyntaxHighlighterType;
|
FSyntaxHighlighterType:=AHighlighterType;
|
||||||
SourceNotebook.UpdateActiveEditColors(FEditor);
|
SourceNotebook.UpdateActiveEditColors(FEditor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -616,7 +616,7 @@ begin
|
|||||||
|
|
||||||
NewSrcEdit.IsLocked := AnEditorInfo.IsLocked;
|
NewSrcEdit.IsLocked := AnEditorInfo.IsLocked;
|
||||||
AnEditorInfo.EditorComponent := NewSrcEdit;
|
AnEditorInfo.EditorComponent := NewSrcEdit;
|
||||||
//debugln(['TFileOpener.OpenFileInSourceEditor ',AnUnitInfo.Filename,' ',AnUnitInfo.EditorIndex]);
|
//debugln(['TFileOpener.OpenFileInSourceEditor ',AnUnitInfo.Filename]);
|
||||||
|
|
||||||
// restore source editor settings
|
// restore source editor settings
|
||||||
DebugBoss.DoRestoreDebuggerMarks(AnUnitInfo);
|
DebugBoss.DoRestoreDebuggerMarks(AnUnitInfo);
|
||||||
|
Loading…
Reference in New Issue
Block a user