diff --git a/src/ce_editor.pas b/src/ce_editor.pas index b0fa9742..747a76ea 100644 --- a/src/ce_editor.pas +++ b/src/ce_editor.pas @@ -256,7 +256,7 @@ begin end; {$ENDREGION} -{$REGION ICEEDitableSHortcut ---------------------------------------------------} +{$REGION ICEEDitableShortcut ---------------------------------------------------} function TCEEditorWidget.scedWantFirst: boolean; begin result := fDoc <> nil; @@ -267,16 +267,13 @@ function TCEEditorWidget.scedWantNext(out category, identifier: string; out aSho var shrct: TSynEditKeyStroke; begin - result := false; - if fShortcutCount > fDoc.Keystrokes.Count-1 then exit; - // shrct := fDoc.Keystrokes.Items[fShortcutCount]; category := 'Editor'; identifier:= shrct.DisplayName; aShortcut := Shortcut(shrct.Key, shrct.Shift); // fShortcutCount += 1; - result := true; + result := fShortcutCount < fDoc.Keystrokes.Count; end; procedure TCEEditorWidget.scedSendItem(const category, identifier: string; aShortcut: TShortcut); diff --git a/src/ce_main.pas b/src/ce_main.pas index 09a04788..382c833f 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -916,16 +916,13 @@ function TCEMainForm.scedWantNext(out category, identifier: string; out aShortcu var act: TCustomAction; begin - result := false; - if fScCollectCount > actions.ActionCount -1 then exit; - // act := TCustomAction(Actions.Actions[fScCollectCount]); category := act.Category; identifier := act.Caption; aShortcut := act.ShortCut; // fScCollectCount += 1; - result := true; + result := fScCollectCount < actions.ActionCount; end; procedure TCEMainForm.scedSendItem(const category, identifier: string; aShortcut: TShortcut);