mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-15 21:39:12 +02:00
IDE: formatting and some refactoring in KeyMapping.
git-svn-id: trunk@41142 -
This commit is contained in:
parent
a2d1bccee3
commit
777bf16774
@ -3325,11 +3325,10 @@ function TKeyCommandRelationList.FindByCommand(ACommand: word):TKeyCommandRelati
|
||||
var i:integer;
|
||||
begin
|
||||
Result:=nil;
|
||||
for i:=0 to FRelations.Count-1 do with Relations[i] do
|
||||
if (Command=ACommand) then begin
|
||||
Result:=Relations[i];
|
||||
exit;
|
||||
end;
|
||||
for i:=0 to FRelations.Count-1 do
|
||||
with Relations[i] do
|
||||
if (Command=ACommand) then
|
||||
Exit(Relations[i]);
|
||||
end;
|
||||
|
||||
procedure TKeyCommandRelationList.AssignTo(ASynEditKeyStrokes: TSynEditKeyStrokes;
|
||||
@ -3597,27 +3596,21 @@ begin
|
||||
TheScope));
|
||||
end;
|
||||
|
||||
function TKeyCommandRelationList.FindCategoryByName(const CategoryName: string
|
||||
): TIDECommandCategory;
|
||||
function TKeyCommandRelationList.FindCategoryByName(const CategoryName: string): TIDECommandCategory;
|
||||
var i: integer;
|
||||
begin
|
||||
for i:=0 to CategoryCount-1 do
|
||||
if CategoryName=Categories[i].Name then begin
|
||||
Result:=Categories[i];
|
||||
exit;
|
||||
end;
|
||||
if CategoryName=Categories[i].Name then
|
||||
Exit(Categories[i]);
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
function TKeyCommandRelationList.FindCommandByName(const CommandName: string
|
||||
): TIDECommand;
|
||||
function TKeyCommandRelationList.FindCommandByName(const CommandName: string): TIDECommand;
|
||||
var i: integer;
|
||||
begin
|
||||
for i:=0 to RelationCount-1 do
|
||||
if CompareText(CommandName,Relations[i].Name)=0 then begin
|
||||
Result:=Relations[i];
|
||||
exit;
|
||||
end;
|
||||
if CompareText(CommandName,Relations[i].Name)=0 then
|
||||
Exit(Relations[i]);
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user