mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +02:00
EditorMacros / PascalScript: fix missing cmd registration
git-svn-id: trunk@38423 -
This commit is contained in:
parent
a2a43cfe89
commit
efbdc6b949
@ -5,8 +5,9 @@ unit EMScriptMacro;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, SrcEditorIntf, Controls, SynEdit, SynEditKeyCmds, EMScriptClasses,
|
||||
Laz2_XMLCfg, LazLoggerBase, uPSCompiler, uPSRuntime, uPSUtils, uPSC_std, uPSR_std;
|
||||
Classes, SysUtils, SrcEditorIntf, IDECommands, Controls, SynEdit, SynEditKeyCmds,
|
||||
EMScriptClasses, Laz2_XMLCfg, LazLoggerBase, uPSCompiler, uPSRuntime, uPSUtils, uPSC_std,
|
||||
uPSR_std;
|
||||
|
||||
type
|
||||
|
||||
@ -113,8 +114,10 @@ begin
|
||||
begin
|
||||
SIRegisterTObject(Sender);
|
||||
//SIRegister_Std(Sender);
|
||||
if Sender is TEMSPSPascalCompiler then
|
||||
if Sender is TEMSPSPascalCompiler then begin
|
||||
GetEditorCommandValues(@TEMSPSPascalCompiler(Sender).AddECFuncToCompEnum);
|
||||
GetIDEEditorCommandValues(@TEMSPSPascalCompiler(Sender).AddECFuncToCompEnum);
|
||||
end;
|
||||
|
||||
CompRegisterBasics(TheCompiler);
|
||||
CompRegisterTSynEdit(TheCompiler);
|
||||
@ -129,6 +132,7 @@ end;
|
||||
procedure AddECFuncToExec;
|
||||
begin
|
||||
GetEditorCommandValues(@TheExec.AddECFuncToExecEnum);
|
||||
GetIDEEditorCommandValues(@TheExec.AddECFuncToExecEnum);
|
||||
ExecRegisterBasics(TheExec);
|
||||
ExecRegisterTSynEdit(TheCLassImp);
|
||||
TheExec.RegisterFunctionName('CALLER', @HandleGetCaller, TheExec, nil);
|
||||
|
@ -666,6 +666,7 @@ function CompareIDEShortCutKey1s(Data1, Data2: Pointer): integer;
|
||||
|
||||
function IdentToIDECommand(const Ident: string; var Cmd: longint): boolean;
|
||||
function IDECommandToIdent(Cmd: longint; var Ident: string): boolean;
|
||||
procedure GetIDEEditorCommandValues(Proc: TGetStrProc);
|
||||
|
||||
implementation
|
||||
|
||||
@ -1579,5 +1580,13 @@ begin
|
||||
Result := IntToIdent(Cmd, Ident, IDEEditorCommandStrs);
|
||||
end;
|
||||
|
||||
procedure GetIDEEditorCommandValues(Proc: TGetStrProc);
|
||||
var
|
||||
i: integer;
|
||||
begin
|
||||
for i := Low(IDEEditorCommandStrs) to High(IDEEditorCommandStrs) do
|
||||
Proc(IDEEditorCommandStrs[I].Name);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user